[Image-SIG] Re: PIL problem

Fredrik Lundh fredrik at pythonware.com
Sun Aug 15 15:16:39 CEST 2004

Thomas Clive Richards wrote:

> I'm trying to make a quick script which generates thumbnails for a website.
> However, I can't get the thumbnail() method to work with PNG files.

the documentation mentions two possible causes:

    Interlaced files are currently not supported.

    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

    >>> import Image
    >>> Image.core.zip_decoder


More information about the Image-SIG mailing list