From 28098de4039e935c79de4a1e0fbb9da14481faa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Tue, 5 Nov 2013 00:02:58 +0100 Subject: [PATCH] enlarge images narrower than 200px --- pysstv/examples/gimp-plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pysstv/examples/gimp-plugin.py b/pysstv/examples/gimp-plugin.py index 10caa8d..98336db 100755 --- a/pysstv/examples/gimp-plugin.py +++ b/pysstv/examples/gimp-plugin.py @@ -72,6 +72,10 @@ class ProgressCanvas(Canvas): width, height = image.size if height / float(width) > 1.5: width *= 2 + elif width < 200: + width *= 2 + height *= 2 + if (width, height) != image.size: image = image.resize((width, height)) Canvas.__init__(self, master, width=width, height=height) self.tk_img = ImageTk.PhotoImage(image)