Answers for "how to size image in tkinter according to window size"

8

set window size tkinter

# Change window_name to the name of the window object, i.e. root
window_name.geometry("500x500")
# To ensure widgets resize:
widget_name.pack(fill="both", expand=True)
Posted by: Guest on February-27-2020
0

python tkinter get image size

img = Image.open("path\\to\\image.jpg")
tkimage = ImageTk.PhotoImage(img)

h = tkimage.height()
w = tkimage.width()
print(h)
print(w)
Posted by: Guest on October-02-2020

Code answers related to "how to size image in tkinter according to window size"

Python Answers by Framework

Browse Popular Code Answers by Language