1997.05.08 21:05 "Re: CCITT Group 4 compression and 256 Colors", by Gregory W Cook
It's me again. I am stuck with a problem. In my previous mails, I had enquired about this problem and I had got quite a few responses. However, I am facing a problem right now and I am in need of the solution urgently.
The problem is that when libtiff is used, and the image being created uses Group 4 compression, then it does not convert to TIFF file. It gives a message
"For Group 3/4 compression, bits per sample must be 1".
However, bits/samples is 4/8 for color images as provided by the TIFF 6.0 specs. Also, specs says that the Group 4 compression can be used only for bilevel, and not for the color images. In this situation, can I compress the image using Group 4 compression?
I've seen at least 4 TIFF mailing list replies to this question, all correct. Perhaps there is a language barrier here, but the answer is still, and always has been:
Aside from the fact that virtually no other TIFF reader would successfully decompress it, the compression you get is horribly inefficient.
Also, is there any way out on this perticular situation?
One more time:
Use either LZW or Deflate (zlib) compression. The best results use a differencing filter before the compression.
Also, one of the responses received by me last time suggested that this is possible, but the compressed image size is very large compared to the original image size. But I feel that is NOT the better alternative.
What is unclear here is why the images are compressed using Group 4 to begin with. The best solution would be to stop using Group 4 compression, since it won't be very efficient anyway. If for some reason you can't do that, you may have to modify libtiff source code for your particular images. Whatever you do, *don't* use a color image/G4 combination and call it TIFF.
Greg Cook, email@example.com
Video and Image Processing Laboratory (VIPER)
West Lafayette, Indiana, USA