AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.11.02 16:58 "Writing bilevel and transparent TIFFs efficiently", by Rupali Holmes
2005.11.03 15:44 "Re: Writing bilevel and transparent TIFFs efficiently", by Bob Friesenhahn
2005.11.03 17:06 "Re: Writing bilevel and transparent TIFFs efficiently", by Frank Warmerdam
2005.11.07 19:16 "Re: Writing bilevel and transparent TIFFs efficiently", by Joris Van Damme
2005.11.07 20:31 "Re: Writing bilevel and transparent TIFFs efficiently", by Bob Friesenhahn
2005.11.07 21:09 "Re: Writing bilevel and transparent TIFFs efficiently", by Joris Van Damme
2005.11.03 15:53 "Re: Writing bilevel and transparent TIFFs efficiently", by Gerben Vos

2005.11.03 15:44 "Re: Writing bilevel and transparent TIFFs efficiently", by Bob Friesenhahn

On Wed, 2 Nov 2005, Rupali Holmes wrote:
>
> 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.

It is possible to use an associated alpha channel with palette 
(PHOTOMETRIC_PALETTE) images, but I am not sure if most software can 
deal with that.  It would support a small file size if the bits per 
sample is a small value (e.g. 1) and the palette has just two entries. 
There is also an option in TIFF to supply a separate mask image.  Use 
of a separate mask image is also likely to be poorly supported except 
for by specialized software.

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.

In the end, the GIF file format or other formats which support the 
notion of a "transparent color" will be much more efficient than TIFF 
for portabily storing this image in minimal space.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/