Traceback (most recent call last):
File "<string>", line 65, in ?
File "<string>", line 31, in __init__
File "PictureList.pyc", line 42, in __init__
File "PictureInfo.pyc", line 23, in __init__
File "Image.pyc", line 1571, in open
IOError: cannot identify image file
Versions:
Python 2.2.2 (#37)
PIL 1.1.4
Thanks
> Anyone come across the problem of PIL not being able to identify image
> files once it's compiled with py2exe?
google knows... ;-)
> Do I need to manually add some plugins to the setup or something?
PIL scans sys.path for plugins (*ImagePlugin files). When running under
py2exe (or any other wrapper), you have to import them yourself. Just
add import statements to your main program for all the formats you need:
import JpegImagePlugin
import PngImagePlugin
import BmpImagePlugin
import GifImagePlugin
# etc
(to get a complete list, look in the PIL package directory)
</F>
i.e, instead of just
import Image
you need to add
import JpegImagePlugin #for jpeg
import TgaImagePlugin #for tga
import PngImagePlugin #for png
...
You need to do this for each image plugin you need
PIL support for. (This question has been asked manytimes
in this group before, I myself have asked it a couple of
times)
You can take a look at PyWiew source code in my homepage
for details.
Regards
Anand Pillai
http://members.lycos.co.uk/anandpillai
kdah...@yahoo.com (Kevin Dahlhausen) wrote in message news:<283adf56.03060...@posting.google.com>...
Thanks - I did search but I guess not long enough for it. It's a good
thing to remember in general for py2exe.