On 7/7/05, Schmitz, Uwe <[hidden email]> wrote:
> I've detected a slight inaccuracy during translation
> of a Gtiff formatted file.
> I have a file f2.tif on which "tiffinfo -c" gives me:
I was somewhat shocked to see this, since I thought I had been
very careful about retaining the full dynamic range when converting
to 16bit for tiff colormaps. What I discovered in the code is that there
are two sets of logic for writing colormaps in TIFF. One for "immediate
writes" and one used in the CreateCopy() case (as used by gdal_translate).
The immediate mode (SetColorTable()) was done right, but the
CreateCopy() was not.