[IMAGE-SIG] Python15/Imaging

Shichang Zhao john1@icubed.com
Fri, 12 Dec 1997 13:26:52 -0500


Are there any plans regarding a new release of PIL for Python 15.

I tried to compile Imaging Version 0.3a with Python 15b2. I can get the
DLL, but when I 
tried to run a demo, I got the following message:

c:\Python15\ImgDemo>python viewer.py lena.ppm
python viewer.py lena.ppm
Traceback (innermost last):
  File "viewer.py", line 44, in ?
    UI(root, im).pack()
  File "viewer.py", line 23, in __init__
    self.image = ImageTk.PhotoImage(im)
  File "C:\Python15\lib\Imaging\ImageTk.py", line 65, in __init__
    self.paste(image)
  File "C:\Python15\lib\Imaging\ImageTk.py", line 81, in paste
    self.__photo.tk.call("PyImagingPhoto", self.__photo, block.id)
TclError: invalid command name "PyImagingPhoto"

The following is what I did:
     1. modify the tkappinit.c file and add:
	    extern void TkImaging_Init(Tcl_Interp* interp);
	    TkImaging_Init(interp);
         I added it.

     2. See the Unix section.  Instead of modifying the Setup file, just
add
         tkImaging.c and tkappinit.c to the project file, and
-DWITH_APPINIT
         to the _tkinter.c compile options.

         I am not clear which project file I should add these two .c files.
So,
         I tried to add them to Tkinter project file first, and then
Imaging project file.
         Both of them gave me the same error (above).

 What's the mistake I made?





_______________
IMAGE-SIG - SIG on Image Processing with Python

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