[IMAGE-SIG] ImageTk.PhotoImage Issues

Fredrik Lundh Fredrik Lundh" <fredrik_lundh@ivab.se
Mon, 14 Jul 1997 15:24:35 +0200


NOTE: Majordomo seems to interpret messages with "help"
in the subject line as requests for help with mailing list issues,
meaning that the mails end up on the list administrator
address...

>Date: Mon, 14 Jul 1997 18:01:50 +1000
>From: piers@cs.su.oz.au (Piers Lauder)
>To: Python Image SIG <image-sig@python.org>
>Subject: Help with PIL ImageTk.PhotoImage
>
>I've been using ImageTk.BitmapImage successfully, and
>then I thought I'd try something more adventurous, but
>it doesn't work. Basically I'm trying to create a
>PhotoImage from a JPEG file:
>
[code sample removed]
>
>and I get:
> Traceback (innermost last):
>   File "./showfaces.py", line 243, in ?
>     main()
>   File "./showfaces.py", line 200, in main
>     UpdateFaces(root, Top, mbox)
>   File "./showfaces.py", line 99, in UpdateFaces
>     _UpdateFaces(root, Top, mbox)
>   File "./showfaces.py", line 161, in _UpdateFaces
>     Faces.append((name, date, getface.GetFaceImage(addr)))
>   File "./getface.py", line 75, in GetFaceImage
>     tkim = makeface(face, file)
>   File "./getface.py", line 102, in makeface
>     return ImageTk.PhotoImage(im)
>   File "/usr/local/lib/python1.4/local/ImageTk.py", line 65, in __init__
>     self.paste(image)
>   File "/usr/local/lib/python1.4/local/ImageTk.py", line 81, in paste
>     self.__photo.tk.call("PyImagingPhoto", self.__photo, block.id)
> TclError: invalid command name "PyImagingPhoto"
> exception in BitmapImage.__del__() ignored
> exception in BitmapImage.__del__() ignored
>
>I'm using Tcl/Tk 7.6/7.2 with PIL 0.3a1.
>Does anyone know of an obvious solution?
>
>________________________________________________________________________________
>Computer Science, Sydney University, Madsen Bldg F09, Sydney NSW 2006, Australia
>Phone: +61 2 9351 2824    Fax: +61 2 9351 3838     http://www.cs.su.oz.au/~piers

Have you linked _tkinter with the PhotoImage interface? See
the README (and Tk/tkImaging.c) for details.

Cheers /F





_______________
IMAGE-SIG - SIG on Image Processing with Python

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