Load image to PhotoImage : PhotoImage « Tkinker « Python Tutorial






from Tkinter import *
root = Tk()
frame = Frame(root)
myimage = PhotoImage(file="new.gif")
b = Button(root)
b.config(image= myimage)   # or  b.image = myimage 
frame.pack()
b.pack()
root.mainloop()








18.24.PhotoImage
18.24.1.Load image to PhotoImage