[PYTHON IMAGE-SIG] Making an Image fromstring()

Fredrik Lundh fredrik_lundh@ivab.se
Thu, 4 Jul 1996 12:59:12 +0200

> [tk] gives me an "image doesn't exist error."

You must pass the image attribute of the ImageTk object to Label, not
the object itself:

tkim = ImageTk.PhotoImage(i.mode,i.size)

root = Tk()
label = Label(root,image=tkim.image)
			     ^^^^^^ added

Looking in my sample stuff, I found that I used a "tkim = tkim.image"
statement just after the paste.  You might have dropped that line by

Regards	/F

IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org