您应该使用
PhotoImage实例作为
image值。另外,您需要保留图像的参考。
im = Image.open(pathToImage)ph = ImageTk.PhotoImage(im)label = Label(window, image=ph)label.image=ph #need to keep the reference of your image to avoid garbage collection

您应该使用
PhotoImage实例作为
image值。另外,您需要保留图像的参考。
im = Image.open(pathToImage)ph = ImageTk.PhotoImage(im)label = Label(window, image=ph)label.image=ph #need to keep the reference of your image to avoid garbage collection