From 9f99f041990f5281e62e05ee0c41433050a2da62 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Tue, 15 Oct 2024 11:09:51 -0400 Subject: [PATCH] updated text elements to scale with image --- markimg/markimg.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/markimg/markimg.py b/markimg/markimg.py index 3174f33..afc33e6 100644 --- a/markimg/markimg.py +++ b/markimg/markimg.py @@ -432,7 +432,13 @@ def run(self, options): #max_x, max_y = image.size fig = plt.figure(figsize=(max_x / 100, max_y / 100)) plt.imshow(image) + + # autoscale text sizes w.r.t. image options.textSize = fig.get_size_inches()[0] * options.textSize + options.addTextSize = fig.get_size_inches()[0] * options.addTextSize + options.lineGap = fig.get_size_inches()[0] * options.lineGap + options.pointSize = fig.get_size_inches()[0] * options.pointSize + img_XY_plane: ImageCanvas = ImageCanvas(max_y, max_x) height = data[row]["origHeight"] ht_scale = height / max_x