on-internet
← Community

Resizing Image and fit it to the Canvas size

Stack Overflow ·

Can anyone help me to resize the image using ImageTk? I have a canvas and I will put pictures there. I have different kinds of pictures = different sizes for all pictures And when I attach the picture (just one) in the canvas, I want the picture's size to resize so that it will fit in the canvas and it will still maintain its proportion. Please help me! I am new in PIL, Tkinter,and Python. Update: I tried using thumbnail under Image but in resizing: self.image.thumbnail(self.picsize,Image.ANTIALIAS) the image is not fitting the canvas size and if the image is longer/wider than the canvas, it i

Comments

Sign in or sign up to comment and upvote.

No comments yet.