AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.03.04 03:05 "[Tiff] LZW Compression with 16-bit TIFF", by Frank Peters
2006.03.04 03:12 "Re: [Tiff] LZW Compression with 16-bit TIFF", by Bob Friesenhahn
2006.03.04 03:33 "Re: [Tiff] LZW Compression with 16-bit TIFF", by Frank Peters
2006.03.04 06:27 "Re: [Tiff] LZW Compression with 16-bit TIFF", by Bob Friesenhahn
2006.03.04 12:21 "Re: [Tiff] LZW Compression with 16-bit TIFF", by Joris

2006.03.04 03:12 "Re: [Tiff] LZW Compression with 16-bit TIFF", by Bob Friesenhahn

On Fri, 3 Mar 2006, Frank Peters wrote:

With 16-bit tiff files, however, the compressed file is actually LARGER. For example, using the above command a 36 megabyte 16-bit tiff file will "compress" to about 46 megabytes. For the other possible options, "-c lzw:1" and "-c lzw", the results are essentially the same. The compressed file is always significantly larger.

If I use "-c zip" as the option, 16-bit files are reduced somewhat (from 36 Mb to 34 Mb).

Is there possibly a bug in the 16-bit lzw code or does the fault lie elsewere?

16 bit data can be difficult to compress. Have you tried enabling horizontal differencing?

   TIFFSetField(tiff,TIFFTAG_PREDICTOR,2);

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/