Saving gifs with optimize=True results in bad image
Mark Doliner <[email protected]>
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <[email protected]> |
Using Python "2.7.1+" on Ubuntu 11.04 I seem to be getting a corrupt
image when saving a gif with the flag optimize=True. I'm able to
reproduce the problem using the attached image and this code:
> import PIL.Image
> PIL.Image.open('test.gif').save('optimized.gif', 'GIF', optimize=True)
Gimp complains if I try to open optimized.gif. I mostly just want to
make sure people are aware of the problem. I found similar reports of
this here:
http://mail.python.org/pipermail/image-sig/2009-November/006007.html
And here:
http://groups.google.com/group/djangofilebrowser/browse_thread/thread/2c5df624ea350c24
Someone in the first email thread mentions that gif doesn't officially
support optimize for gif files. And that sounds good... but maybe it
would be better if PIL ignored the attribute instead of creating this
seemingly invalid image?
--Mark
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig
test.gif
(image/gif, 746 B) - not displayed