2000.03.20 16:47 "TIFFTAG_COLORMAP", by Byron Young

Question concerning color maps for palette color images.

PhotometricInterpretation=3
BitsPerSample = 8
SamplesPerPixel = 1
Assume all other values default values.

For the tag TIFFTAG_COLORMAP, the TIFFGetField function returns three uint16** values. Exactly how do the values get placed into these arrays? Is the first argument the Red component, the second argument the Green component, and the third argument the Blue component?

For a specific example, 8 BitsPerSample,

uint16 R[256], G[256], B[256];
uint16 ** ppR, **ppG, **ppB;
int i;
TIFF * tf;
ttag_t tag;

ppR = (uint16 **) &R;
ppG = (uint16 **) &G;
ppB = (uint16 **) &B;
tag = TIFFTAG_COLORMAP;
i = GetField(tf,tag, ppR, ppG, ppB);

Will the following code read the color map into three arrays, with the RGB values for color 0 being R[0], B[0], C[0]?

Thanks,
Byron
bkyoung@jps.net