1997.05.08 13:50 "CCITT Group 4 compression and 256 Colors", by Sanjay G. Prabhudesai

1997.05.12 05:44 "Re: To ALL TIFF MAILING LIST MEMBERS", by Rainer Wiesenfarth

I have a customer who is bent on using Group 4 compression for reasons not known to me.

(flame on - I hope the customer's name isn't Microsoft - flame off)

Maybe you should tell your customer that it MAKES ABSOLUTELY NO SENSE to compress an image with anything other than the TWO COLORS black and white with Group 4. This has - as repeatedly stated - a number of reasons:

  1. The file you generate would NO LONGER BE A TIFF FILE. You can name it xxx.tif, you can use the tags and so on, but you MUST NOT CALL IT "TIFF"!!! If you want to generate a TIFF file, you have to follow the standard. This results in either converting the image to greyscale or to switch to an other compression scheme.
  2. No other TIFF reader would read and interpret your images correctly. What you intend to do is telling TIFF that your image is 8 times the width. As a result, each 'normal' TIFF reader would display it in black and white only, horizontally stretched by a factor of 8. You will not be able to recognise anything in this image.
  3. As the Group 4 compression is designed primary for bilevel images like fax sheets, it is optimised for a longer sequence of bits of the same value. As you encode your 8-bit color values in a scanline in addition to the image pixels, you will get a - from Group 4's sight - bad mixture of 0s and 1s. The compression ratio would not justify the effort made for compression. Maybe you should create a sample of this and show it to your customer, along with the same image compressed using other methods.

While trying this approach using libTIFF writer I got the following error message:

 "Bits per sample must be 1 for Group 3/4 encoding/decoding".

You have to set PhotometricInterpretation to MinIsWhite and BitsPerSample to 1.

Greetings Rainer

--

| This mail came from:
| Rainer Wiesenfarth                 Tel: +49 7364 203321
| c/o Carl Zeiss, Div. Phm-A         Fax: +49 7364 202829
| 73446 Oberkochen                e-mail: Wiesenfarth@zeiss.de
| Germany