TIFF Tag PhotometricInterpretation
|Code||262 (hex 0x0106)|
The color space of the image data.
The specification considers these values baseline:
0 = WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white.
1 = BlackIsZero. For bilevel and grayscale images: 0 is imaged as black.
2 = RGB. RGB value of (0,0,0) represents black, and (255,255,255) represents white, assuming 8-bit components. The components are stored in the indicated order: first Red, then Green, then Blue.
3 = Palette color. In this model, a color is described with a single component. The value of the component is used as an index into the red, green and blue curves in the ColorMap field to retrieve an RGB triplet that defines the color. When PhotometricInterpretation=3 is used, ColorMap must be present and SamplesPerPixel must be 1.
4 = Transparency Mask. This means that the image is used to define an irregularly shaped region of another image in the same TIFF file. SamplesPerPixel and BitsPerSample must be 1. PackBits compression is recommended. The 1-bits define the interior of the region; the 0-bits define the exterior of the region.
These values are considered an extension:
5 = Seperated, usually CMYK.
6 = YCbCr
8 = CIE L*a*b* (see also specification supplements 1 and 2)
9 = CIE L*a*b*, alternate encoding also known as ICC L*a*b* (see also specification supplements 1 and 2)
The TIFF-F specification (RFC 2301) defines:
10 = CIE L*a*b*, alternate encoding also known as ITU L*a*b*, defined in ITU-T Rec. T.42, used in the TIFF-F and TIFF-FX standard (RFC 2301). The Decode tag, if present, holds information about this particular CIE L*a*b* encoding.
LibTiff defines mostly the same values, and adds support for Pixar LogL and LogLuv encoding:
PHOTOMETRIC_MINISWHITE = 0;
PHOTOMETRIC_MINISBLACK = 1;
PHOTOMETRIC_RGB = 2;
PHOTOMETRIC_PALETTE = 3;
PHOTOMETRIC_MASK = 4;
PHOTOMETRIC_SEPARATED = 5;
PHOTOMETRIC_YCBCR = 6;
PHOTOMETRIC_CIELAB = 8;
PHOTOMETRIC_ICCLAB = 9;
PHOTOMETRIC_ITULAB = 10;
PHOTOMETRIC_LOGL = 32844;
PHOTOMETRIC_LOGLUV = 32845;
The DNG specification adds these definitions:
32803 = CFA (Color Filter Array)
34892 = LinearRaw
51177 = Depth
There is no default for PhotometricInterpretation, and it is required. Do not rely on applications defaulting to what you want.