[Image-SIG] PNG PIL compression questions
Svensson, Stefan
stsvs@wmdata.com
Fri, 4 Aug 2000 12:54:15 +0200
Hello,
I have some qustions concerning compression behaviour and compression ratio
when saving images in PNG-format with PIL.
I have a scanned image that I have saved in Paintshop Pro:
1. First saved as TIFF LZW (38 kb) in Paintshop Pro and then opened in the
Python interpretor and saved as PNG. The PNG file size become 38kb.
Import Image
im = Image.open("c:/image.tif")
im.save("c:/image.png")
2. The same imaged saved in Paintshop Pro as a PNG (21 kb!) and when
openened and saved in the Python interpretor as an PNG the file size become
55 kb!
As an alternative to PIL and Python I have also tryed the Java Advaced
Imaging API (JAI) and the resulting PNG file size is always 21 kb. But PIL
is so much easier to use...
I wonder why does this happen and are there any ways to improve the
compression ratio and get a consistent behaviour when using PIL together
with PNG?
BTW, any plans for TIFF G4 support?
I am using Windows NT4, Python 1.5.2 (binary release got from python.org)
and PIL 1.0 (pil-win32-991101.zip binary release got from pythonware.com).
Best regards,
/Stefan Svensson
stsvs@wmdata.com