[Tutor] ImageTk problem
Fri, 23 Feb 2001 14:53:54 -0500
The following code produces no error and no visible picture. The size of
the picture is known since using a different image will change the size
of the label. It doesn't matter whether it's a gif or a jpg.
What am I overlooking?
from Tkinter import *
import Image, ImageTk
self.win = win
im1 = Image.open("picture.gif")
im2 = ImageTk.PhotoImage(im1)
Label(self.win, image = im2).pack()
b = Button(self.win,text='Quit',height=2)
b.config(command = lambda w = self.win: w.destroy())
root = Tk()
if __name__ == '__main__':
"The financial policy of the welfare state requires that there be no
way for the owners of wealth to protect themselves. This is the
shabby secret of the welfare statists' tirades against gold. Deficit
spending is simply a scheme for the 'hidden' confiscation of wealth.
Gold stands in the way of this insidious process. It stands as a
protector of property rights."
-- Alan Greenspan
Rick Pasotto email: firstname.lastname@example.org