AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1997.04.29 13:27 "Group 4 Compression and 256 Colors", by Sanjay G. Prabhudesai
1997.04.30 00:04 "Re: Group 4 Compression and 256 Colors", by Helge Blischke
1997.04.30 07:34 "Re: Group 4 Compression and 256 Colors", by Iñigo López

1997.04.30 00:04 "Re: Group 4 Compression and 256 Colors", by Helge Blischke

I am new to this mailing list. I have a fundamental doubt about a TIFF format.

I have a 256 color image. I want to transfer the same in TIFF format using Group 4 compression. Is it possible?

As specified in the TIFF specifications, Group 4 compression technique is used for BILEVEL images. Does it mean that this type of compression can be used only if the image is Black/White?

As Group 4 compression is designed for compressing BITstrings consisting of large consecutive substrings of '1' ("black") and/or '0' bits and relies on the fact that the distribution of '0' and '1' bits varies only slightly from scanline to scanline, it doew not make much sense to apply this algorithm to color images whatever kind of. Theoretically, of course, you could treat a 256 color palette image as a "bilevel" image (multiplying image width by 8 before applying group 4 compression), but it is very likely that the "compressed" image will be substantially larger than the uncompressed one, as the color index values map into substrings of identical bits of very short length (usually about 4), which do not compress very well (see the "codeword" tables listed in the TIFF spec).

Hope this will make clear, why the TIFF spec defines group 4 compression only for bilevel images.

H. Blischke