1998.09.22 14:49 "TIFF Questions - TIFF 7.0 ?", by Ed Grissom

1998.09.22 14:52 "Transparent pixel value (no transparency mask)", by Ed Grissom

This message is one of a series of messages with questions about advanced raster topics and TIFF. See the message entitled "Tiff Questions - TIFF 7.0 ?" for more info.

In previous messages on the TIFF list, others have asked if there were any way to specify a pixel value that should be treated as transparent.

We are also interested in a solution to this problem. As far as I can tell, the only way to do transparency is to either use ExtraSamples and have a Alpha Mask that basically has 0% for transparent pixels and 100% for non-transparent pixels, or to have a multi-image file (linked list of IFDs) where the second image can be a transparency bitmask.

While this solution is valid, it presents difficulties in practice. Most of our applications are geared toward greyscale and RGB images only. We do not normally deal with Alpha channels. To be able to handle transparency with some "overlay" image would require either single-bit image processing to be added to these application or Alpha channel handling to be added. On the other hand, a designated pixel value that is transparent can easily be added since we already have this capability in our internal format.

One other solution is to use the TransparencyIndicator TAG from the TIFF/IT specification. However this TAG is limited to certain image types, and a full-blown TIFF/IT implementation should not be needed just to have transparency.

When working on satellite data or aerial photographs, we typically have to resampling and rectifying these images to fit a projection model that is being used to work with the data. Since it is unlikely that the edges of the sat. image or the photo will match up with vertical and horizontal grids in the projection, the resampled images typically have triangular areas near each of the edges without valid data. We would like to be able to specify zero as the transparency value, fill the triangular edges with zeros, and during the resampling process change any "real" zero value found in the file to one (so that no areas inside the image are transparent).

Obviously, this cannot be guaranteed to work correctly for JPEG compressed files since you cannot be sure that the compression process will not change the "one" back to a "zero". Also, applications that need more than one transparent value will probably be better served with the current implementation of a bit-mask.

I think the addition of a tag to specify a transparent value would be a great addition to TIFF.

Is there any chance that some feature like this could be added to TIFF? One that is less restrictive than the TIFF/IT definition? Perhaps in 7.0 or in a new Tech. Note?

ed grissom