2004.01.14 12:01 "[Tiff] COLORMAP and byte padding", by Stephan Assmus
-
2004.01.14 15:07 "Re: [Tiff] COLORMAP and byte padding", by Frank Warmerdam
-
2004.01.14 16:18 "Re: [Tiff] COLORMAP and byte padding", by Gerben Vos
- 2004.01.14 16:43 "Re: [Tiff] COLORMAP and byte padding", by Joris Van Damme
- 2004.01.14 18:18 "Re: [Tiff] COLORMAP and byte padding", by Marti Maria
- 2004.01.15 00:05 "Re: [Tiff] COLORMAP and byte padding", by Chris Cox
-
2004.01.14 16:18 "Re: [Tiff] COLORMAP and byte padding", by Gerben Vos
2004.01.15 00:05 "Re: [Tiff] COLORMAP and byte padding", by Chris Cox
There is no support for alpha values in the TIFF colormaps, so you just need to deal with the red, green and blue components. The individual components are uint16's to give additional precision in color specification. I have typically computed the 16bit value by multiplying the 8bit value by 256, but that isn't really the most precise approach as 255 would not quite become the maximum 16bit value (65535).
Either shift left by 8 and or the values (val16 = (val8 << 8) | val8), or multiply by 257 (255 * 257 = 65535).
Chris