Problem with optimize flag and GIF encoder

Ian Ward <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Hello,

I am running python 2.5 and PIL 1.1.6 on Debian Lenny, and I've found
that using the optimize flag when creating GIF files can create invalid
images.  An example:

>>> im = Image.new('RGB', (20,44))
>>> im.save('test.gif', optimize=True)
>>> im2 = Image.open('test.gif')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1917, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
>>>

I came across this problem using django-filebrowser, which has
optimize=True as a default for creating thumbnails of all image formats.

Ian

(sorry if this message gets posted twice, I'm resending 20h after my
first attempt)
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.