Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PIL Error: "cannot read interlaced PNG files"

Reply
Thread Tools

PIL Error: "cannot read interlaced PNG files"

 
 
T-u-N-i-X
Guest
Posts: n/a
 
      09-10-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.

 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      09-10-2007
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 -------------

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash in Java 1.6.0_13 ImageIO PNG decoder (and possibly later versions) loading large interlaced PNGs with low memory dy/dx Java 16 11-13-2012 02:42 PM
ANN: PNG image CAPTCHA with PNG canvas available (SkimpyGimpy) aaronwmail-usenet@yahoo.com Python 0 04-18-2007 07:33 PM
interlaced vs progressive scan question wdoe999@yahoo.com DVD Video 9 11-18-2006 10:59 PM
MPEG-2 interlaced RicercatoreSbadato Digital Photography 1 11-21-2005 07:23 PM
are (some) digi's interlaced? AusDigi Digital Photography 1 09-27-2003 12:21 PM



Advertisments