[Image-SIG] PIL: viewer.py errors

Heather Drury heather@v1.wustl.edu
Tue, 23 Mar 1999 14:51:34 -0600 (CST)


Hello,

I realize it's bad form to answer my own post, but to save
anyone the trouble I figured out that the tkappinit.c file wasn't
getting recompiled with the WITH_PIL flag and therefore the
relevent PyImagingPhoto command was not getting registered.

I realized I need to recompile tkinter.c but didn't think
I needed to recompile tkappinit.c since I'm not running "an
old Python version" as it says in the README file.

At any rate, it works.

Heather

> 
> Hi,
> 
> I'm trying to run the viewer.py demo program that came with 
> Imaging-1.0b1 (using Python-1.5.2b2), and when I try to
> display an image, I get the following errors:
> 
> What have I done wrong?
> TIA,
> 
> heather
>  
> v1 98% py viewer.py ../Images/lena.jpg
> 
> 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 "/usr/local/lib/python1.5/site-packages/PIL/ImageTk.py", line 83, in __init__
>     self.paste(image)
>   File "/usr/local/lib/python1.5/site-packages/PIL/ImageTk.py", line 105, in paste
>     im.load()
>   File "/usr/local/lib/python1.5/site-packages/PIL/ImageFile.py", line 162, in load
>     raise IOError, "decoder error %d when reading image file" % e
> IOError: decoder error -2 when reading image file
> 
> Heather Drury                               	heather@v1.wustl.edu 
> Washington University School of Medicine    	http://v1.wustl.edu	
> Department of Anatomy & Neurobiology         	Phone: 314-362-4325
> 660 S. Euclid, MS 8108                       	FAX: 314-747-4370
> St. Louis, MO 63110-1093
> 
> _______________________________________________
> Image-SIG maillist  -  Image-SIG@python.org
> http://www.python.org/mailman/listinfo/image-sig
> 


-- 

Heather Drury                               	heather@v1.wustl.edu 
Washington University School of Medicine    	http://v1.wustl.edu	
Department of Anatomy & Neurobiology         	Phone: 314-362-4325
660 S. Euclid, MS 8108                       	FAX: 314-747-4370
St. Louis, MO 63110-1093