[Image-SIG] zlib.error -5 in PIL 1.1.7b1

Joel Verhagen joel.verhagen at gmail.com
Fri Aug 21 16:04:14 CEST 2009


I'm using PIL version 1.1.7b1 and when setting the mode of this image to RGB
(http://img197.imageshack.us/img197/8961/111294.png)

img = Image.open('111294.png')
img.convert('RGB')

And it throws the following error:

Traceback (most recent call last):
  File "F:\4scrape\ScrapeDex\swatch prominence\test.py", line 44, in
<module>
    img = Image.open(image)
  File "C:\Python26\lib\site-packages\PIL\Image.py", line 1965, in open
    return factory(fp, filename)
  File "C:\Python26\lib\site-packages\PIL\ImageFile.py", line 91, in
__init__
    self._open()
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 321, in
_open
    s = self.png.call(cid, pos, len)
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 112, in
call
    return getattr(self, "chunk_" + cid)(pos, len)
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 193, in
chunk_iCCP
    self.im_info["icc_profile"] = zlib.decompress(s[i+2:])
zlib.error: Error -5 while decompressing data

When doing this same process with PIL 1.1.6 final, no error is thrown. The
image link above is the exact copy of the failing image, so you can use it
for diagnostics.
-- 
Joel Verhagen
http://www.wintallo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090821/6207a7b2/attachment-0001.htm>


More information about the Image-SIG mailing list