I am trying to display an image in python using the tkinter canvas option. However, if I input it in a class, like below, it doesn\'t give an error but also doesn\'t show my
You have to keep a reference to the PhotoImage. This is just and example (you can also use self.background instead of c.background):
self.background
c.background
c = Canvas(frame2) c.pack(expand=YES,fill=BOTH) c.background = PhotoImage(file='Board.gif') c.create_image(100,100,image=c.background,anchor='nw')