[Image-SIG] Re: PIL problem
Thomas Clive Richards
thomi at thomi.imail.net.nz
Sun Aug 15 22:36:42 CEST 2004
On Mon, 16 Aug 2004 1:16 am, Fredrik Lundh wrote:
>
> the documentation mentions two possible causes:
>
> Interlaced files are currently not supported.
>
ahhh, okay.. I have no idea what an interlaced png is, but I'm sure I can find
out. THanks for your help! The files I am trying to convert are interlaced
files.
> To enable PNG support, you need to build and install the ZLIB
> compression library before building the Python Imaging Library.
>
> to check if the former is the problem, check if there's an "interlace"
> member in the im.info dictionary
>
> >>> import Image
> >>> im = Image.open("somefile.png")
> >>> im["interlace"]
>
> to check for the latter, check that Image.core has a zip_decoder
>
> member:
> >>> import Image
> >>> Image.core.zip_decoder
>
> </F>
>
>
This is what I got:
Python 2.2.3+ (#1, Feb 25 2004, 23:29:31)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> im = Image.open('title.png')
>>> im["interlace"]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: PngImageFile instance has no attribute '__getitem__'
>>> im.info
{'Comment': 'Created with The GIMP by Thomi Richards', 'interlace': 1}
>>> Image.core.zip_decoder
<built-in function zip_decoder>
Are there plans to add support for interlaced png files at any time soon?
Thanks again
--
Thomi Richards,
thomi at once.net.nz
More information about the Image-SIG
mailing list