TIFF 6.0 Specification
Final—June 3, 1992
For Palette color PhotometricInterpretation, the Colormap maps the pixel into
three 16-bit values that when scaled to BitsPerSample-bits serve as indices into
the TransferFunction tables which decompand the RGB value. The WhitePoint
and PrimaryChromaticities further describe the underlying RGB colorimetry.
A Palette value can be scaled into a TransferFunction index by:
index= (value * ((1 << BitsPerSample) - 1)) / 65535;
A TransferFunction index can be scaled into a Palette color value by:
value= (index * 65535L) / ((1 << BitsPerSample) - 1);
Be careful if you intend to create Palette images with a TransferFunction. If the
Colormap tag is directly converted from a hardware colormap, it may have a
device gamma already incorporated into the DAC values.
For YCbCr PhotometricInterpretation, ReferenceBlackWhite expands the coding
range, the YCbCrCoefficients describe the decoding matrix to transform YCbCr
into RGB, TransferRange expands the range of the TransferFunction, and the
TransferFunction tables decompand the RGB value. The WhitePoint and
PrimaryChromaticities fields provide further description of the underlying RGB
colorimetry.
After coding range expansion by ReferenceBlackWhite and TransferFunction
expansion by TransferRange, RGB values may be outside the domain of the
TransferFunction. Also, the display device matrix can transform RGB values into
display device RGB values outside the domain of the device. These values are
handled in an application-dependent manner.
For RGB images with non-default ReferenceBlackWhite coding range expansion
and for YCbCr images, the resolution of the TransferFunction may be insuffi-
cient. For example, after the YCbCr transformation matrix, the decoded RGB
values must be rounded to index into the TransferFunction tables. Applications
needing the extra accuracy should interpolate between the elements of the
TransferFunction tables. Linear interpolation is recommended.
For WhiteIsZero and BlackIsZero PhotometricInterpretation, the
TransferFunction decompands the grayscale pixel value to a linear 16-bit form.
Note that a TransferFunction value of 0 represents black and 65535 represents
white regardless of whether a grayscale image is WhiteIsZero or BlackIsZero.
For example, the zeroth element of a WhiteIsZero TransferFunction table will
likely be 65535. This extension of the TransferFunction field for grayscale im-
ages is intended to replace the GrayResponseCurve field.
The TransferFunction does not describe a transfer characteristic outside of the
range for ReferenceBlackWhite.
Default is a single table corresponding to the NTSC standard gamma value of 2.2.
This table is used for each channel. It can be generated by:
NValues = 1 << BitsPerSample;
for (TF[0]= 0, i = 1; i < NValues; i++)
TF[i]= floor(pow(i / (NValues - 1.0), 2.2) * 65535 + 0.5);
85
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.