T-u-N-i-X wrote: > 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. > Perhaps so, but it would seem this is your only viable option short of either persuading the effbot to patch PIL to read interlaced PNGs or patching it yourself.
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden --------------- Asciimercial ------------------ Get on the web: Blog, lens and tag the Internet Many services currently offer free registration ----------- Thank You for Reading ------------- -- http://mail.python.org/mailman/listinfo/python-list