mirror of
https://github.com/dnet/pySSTV.git
synced 2025-12-06 07:12:00 +01:00
enlarge images narrower than 200px
This commit is contained in:
parent
d50797b69c
commit
28098de403
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue