AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2008.11.21 16:50 "[Tiff] 24 bit Color to 8 bit Palettized Conversion Utility (tiffcp enhancement/variation?)", by Kevin Myers
2008.11.21 17:29 "Re: [Tiff] 24 bit Color to 8 bit Palettized Conversion Utility (tiffcp enhancement/variation?)", by Frank Warmerdam
2008.11.21 18:49 "Re: [Tiff] 24 bit Color to 8 bit Palettized Conversion Utility (tiffcp enhancement/variation?)", by Bob Friesenhahn
2008.11.21 19:11 "Re: [Tiff] 24 bit Color to 8 bit Palettized Conversion Utility (tiffcp enhancement/variation?)", by Bob Friesenhahn
2008.11.21 19:37 "Re: [Tiff] 24 bit Color to 8 bit Palettized Conversion Utility (tiffcp enhancement/variation?)", by Kevin Myers
2008.11.21 21:27 "[Tiff] Re: RGB to palette images", by Richard Nolde
2008.11.21 21:45 "Re: [Tiff] Re: RGB to palette images", by Kevin Myers
2008.11.21 21:56 "Re: [Tiff] Re: RGB to palette images", by Bob Friesenhahn
2008.11.21 22:12 "Re: [Tiff] Re: RGB to palette images", by Toby Thain
2008.11.21 23:51 "Re: [Tiff] Re: RGB to palette images", by Kevin Myers
2008.11.21 21:54 "Re: [Tiff] Re: RGB to palette images", by Frank Warmerdam
2008.11.21 22:24 "Re: [Tiff] Re: RGB to palette images", by Bob Friesenhahn
2008.11.21 22:46 "Re: [Tiff] Re: RGB to palette images", by Kevin Myers

2008.11.21 21:56 "Re: [Tiff] Re: RGB to palette images", by Bob Friesenhahn

But, while scanning an image, if I come across a new unique color (a color that hasn't already been added to the palette), then I do know the index into the palette, because I know that this is the nth new color that I have added to the palette, right? So, I still think that this could be done in a single pass, building the palette on the fly, if desired, but maybe I am overlooking something.

The common problem is that the image contains more colors than the palette can contain. In the case where the input file is carefully crafted so that you always know that the number of colors will fit in the colormap, then the colormap can be constructed on the fly. I don't know if libtiff requires that the colormap be supplied up front, or if it can be attached at the end.

If you make sure to check for separate email from me, I will describe a method to speed quantization of your huge imges using existing GraphicsMagick

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