如何在Tkinter中添加图像?
这给了我一个语法错误:
root = tk.Tk()
img = ImageTk.PhotoImage(Image.open(path))
panel = tk.Label(root, image = img)
panel.pack(side = "bottom", fill = "both", expand = "yes")
root.mainloop()
四季花海
Smart猫小萌
相关分类