[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

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

And it throws the following error:

Traceback (most recent call last):
  File "F:\4scrape\ScrapeDex\swatch prominence\test.py", line 44, in
    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
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 321, in
    s = self.png.call(cid, pos, len)
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 112, in
    return getattr(self, "chunk_" + cid)(pos, len)
  File "C:\Python26\lib\site-packages\PIL\PngImagePlugin.py", line 193, in
    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
-------------- 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