Skip to content

Commit

Permalink
added logic to autoscale font size
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Oct 14, 2024
1 parent c8f0930 commit b7287ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion markimg/markimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,9 @@ def run(self, options):

max_y, max_x, RGB = image.shape
#max_x, max_y = image.size
plt.figure(figsize=(max_x / 100, max_y / 100))
fig = plt.figure(figsize=(max_x / 100, max_y / 100))
plt.imshow(image)
options.textSize = fig.get_size_inches()[0] * options.textSize
img_XY_plane: ImageCanvas = ImageCanvas(max_y, max_x)
height = data[row]["origHeight"]
ht_scale = height / max_x
Expand Down

0 comments on commit b7287ce

Please sign in to comment.