2005.11.02 16:58 "[Tiff] Writing bilevel and transparent TIFFs efficiently", by Rupali Holmes

2005.11.07 19:16 "Re: [Tiff] Writing bilevel and transparent TIFFs efficiently", by Joris Van Damme

I'm trying to write a bilevel image as a transparent TIFF. So one of the colors is always transparent, and the other is opaque. What is the best way to do this? I can't use G3 or G4 because the colors are not necessarily black and white. The one option I see is to write an RGB image with an associated alpha but that doesn't seem very efficient. Is there a better way to do this? What type of compression should be used?

The question is not really what is possible or produces the most compact result. The question is really what is the most compact format that existing software can be expected to read.


As far as I am aware the photometric is independent of the compression used. Certainly CCITT FAX standards require particular photometrics. I don't see that using G3 or G4 compression absolutely *requires* using PHOTOMETRIC_MINISBLACK or PHOTOMETRIC_MINISWHITE. Some readers may assume that.

The reason that G3 and G4 traditionally is related to these photometrics, is that this compression is defined for only 1 channel per pixel, 1 bit per channel data. But indeed, it should be equally possible and logical to apply it to say 1 channel per pixel, 1 bit per channel PHOTOMETRIC_PALETTE data, for example.

It is possible to use an associated alpha channel with palette (PHOTOMETRIC_PALETTE) images,

Is it? I'm not entirely convinced.

Ultimately, the PHOTOMETRIC_RGB photometric with associated alpha at 8 bits per sample is the best supported by readers even though it is not very efficient.

Agreed. But if the single color is a gray color, a grayscale PHOTOMETRIC_MINISWHATEVER with associated alpha might also work almost just as good.

Joris Van Damme
Download your free TIFF tag viewer for windows here: