2004.02.23 12:55 "[Tiff] Request for new functions", by Vladimir Pastukhov

2004.02.23 14:50 "Re: [Tiff] Request for new functions", by Frank Warmerdam

I'm adding Group3 and Group4 TIFF compression support to Python Imaging Library, using Libtiff codecs.


I will leave this issue primarily to Andrey. However, I have a few general questions:

  1. Why not just implement all image access (on a block by block basis) for PIL with libtiff? It seems to me there has been a longstanding desire for a libtiff based PIL TIFF driver in addition to the existing custom one.
  2. If not building a fully libtiff based plugin, why not just adapt the codec code you need from libtiff into the pil plugin instead of using a full libtiff just for the codecs.

I guess my general concern is that libtiff wasn't really intended to be a "codec engine" for applications that want to use the codecs in isolation. In my own library (GDAL), I needed one of the codecs for use with a non-TIFF format, but I found it easier to just copy and modify the codec code I required.

Because PIL can read image in chunks, calling appropriate decoder, it is necessary to save and restore TIFF codec's state.

Perhaps it is this chunking I don't understand. Lots of applications want to read TIFF files in chunks, but libtiff generally requires them to read a whole strip or block at a time, with a special case for line by line reading I think.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent