PIL Error: "cannot read interlaced PNG files"

T-u-N-i-X alperkanat at gmail.com
Mon Sep 10 14:38:26 EDT 2007


Hey There,

I'm developing an application that lets the user to upload JPG and PNG
files. I'm using PIL to check the images after the upload (like
checking it storage size, width and height). But PIL raises an error:

"cannot read interlaced PNG files"

It says that interlaced PNG files are not supported in the PIL
documentation. I'm using PIL 1.1.6-2 on Arch Linux..

I can check all images with:

from PIL import Image
im = Image.open('image.png')
im.info

which returns a dictionary about the image. If the dict has
'interlace' key with the value 1, then I reject the event that's being
send with a validation error. But I don't think this is a good idea
since this could be very annoying for the users.




More information about the Python-list mailing list