- 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 21:27 "[Tiff] Re: RGB to palette images", by Richard Nolde
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/