Then the size of the unit before and after seems to be different?
import tkinter as tk
The from PIL import Image, ImageTk
The class test (tk. Tk) :
Def __init__ (self) :
Super (test, self) __init__ ()
Self. Label=tk. Label (self, width=100, height=10, text='this is an innocent label') # initial setup the label width and height of the
The self. The label. The pack ()
The self. The button=tk. The button (self, text='innocent button, the command=self. Show_img)
The self. The button. The pack ()
Def show_img (self) :
Img_open=Image. Open (' images')
Resized=img_open. Resize ((600, 700), the Image. The ANTIALIAS) # set the Image size
Img=ImageTk. PhotoImage (resized)
The self. The label. The config (image=img)
The self. The label. The image=img
If __name__=="__main__ ':
GUI=test ()
GUI. Mainloop ()
For help, meowed, save the children