2004.05.17 10:05 "[Tiff] Tiff Compression and bits per sample", by Mayank

2004.05.17 13:03 "Re: [Tiff] Tiff compression and bits per sample", by Frank Warmerdam

  1. I want know whether all kinds of compression schemes possible within a TIFF file, are supported by libtiff?


There are undoubtedly some unusual compression types not supported by libtiff, but (with the LZW patches) the all the common ones are handled fairly well. My understanding is that Leadtools implements a variation of JPEG2000 in TIFF for instance that is not supported by libtiff. I am sure many other custom compression types exist in specific applications.

  1. Do we need to install separate patches for supporting some/all of those?

Some of the existing ones depend on external libraries (libz, libjpeg).

  1. If there are any licensing issues with installing those patches? (e.g. I have come to know that for supporting lzw compression we need to install a patch and also need to buy out a license for using the same)

Of the stuff you can build libtiff with, I am only aware of licensing issues with the LZW support. I believe the patent for the LZW patent has already expired in the USA but may still be valid in some other countries, so it isn't clear whether you need to license it anymore.

  1. Apart from 8, 16, 32 and so on, bits per sample TIFF images, are there any other bit per sample TIFF images possible e.g. 1, 2, 4, 9, 17 and like wise other bits per sample images.

1, 2 and 4 are relatively common as well. Other (odd) sizes are legal (though not part of the baseline) but are not supported by libtiff. At least not by the code that actually interprets the raster data.

However, to address your overall concern, if you are careful to build libtiff with the various optional compression formats (see tiffconf.h) and more importantly, if you are careful to support all data organizations (tiled/striped, planarconfig_seperate/contig), sample formats (uint, int, float), pixel sizes (1/2/4/8/16/32/64), and color models you can have very comprehensive TIFF support. Most applications fall down not because of limitations of libtiff but because they don't handle all options in their own code.

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