Non capisco perchè con questo programmino:
from Tkinter import *
root = Tk()
lab = Label(root)
lab.pack(expand=YES, fill=BOTH)
img = PhotoImage(file=r'immagine.GIF')
lab.config(image=img)
mainloop()
riesco a visualizzare l'immagine mentre con quest'altro no:
from Tkinter import *
class LabelDemoWindow:
def __init__( self, parent ):
self.root = parent
self.quadro = Frame(parent)
self.quadro.pack(expand=YES, fill=BOTH)
IMMAGINE = PhotoImage(file=r'immagine.GIF')
bitmap = Label(self.quadro, image=IMMAGINE,
relief=SUNKEN, borderwidth=2)
bitmap.pack(side=TOP, anchor='e')
root = Tk()
miaAppl = LabelDemoWindow(root)
root.mainloop()