AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

2001.05.30 12:34 "How do ReferenceBlackWhite and TransferFunction interact for RGB photometry?", by Knutsen, Dale

I am having difficulty conclusively interpreting the TIFF 6.0 spec (section 20 "RGB Image Colorimetry") -- specifically in how ReferenceBlackWhite and TransferFunction (when both are present) interact for RGB photometry.

Here is my idea, can anyone confirm that this is correct or else describe how it is supposed to work?

Summary: The raw value of an RGB component is first converted to a zero-based value using ReferenceBlackWhite, and then that zero-based value is used to index into the TransferFunction table.

Here is what I find in the specification that leads me to this understanding.

1. The specification says this about ReferenceBlackWhite decoding: (quote)

    The full range component value is converted from the code by:

    FullRangeValue = (code - ReferenceBlack) * CodingRange
        / (ReferenceWhite - ReferenceBlack);

2. The specification says this about TransferFunction (this text is under the TransferRange heading): (quote)

    After ReferenceBlackWhite and/or YCbCr decoding has taken place,
    an RGB value can be represented as a real number.
    It is then rounded to create an index into the
    TransferFunction table. In the absence of a TransferRange tag,
    or if the tag has the default values, the rounded value
    is an index and the normalized intensity value is:

    index = (int) (value + (value < 0.0? -0.5: 0.5));
    intensity = TF[index] / 65535;

One implication of the above is that the TransferFunction table *always* covers the domain from black to white, and does not map input values that are whiter than reference white nor blacker than reference black.

Thanks for any help in understanding this...

        Dale Knutsen
       Xerox Research & Technology