PLAdaptedXYZToSRGB

Compliance, colour management

Description

Converts a CIE XYZ colour to sRGB, adapting the colour from its own white point to the sRGB white point D65 when the two differ

Syntax

Delphi

Function PLAdaptedXYZToSRGB(X, Y, Z, WX, WY, WZ: Double): TPDFRGBColor;

Parameters

X, Y, ZThe CIE XYZ tristimulus values, given relative to the white point (WX, WY, WZ)
WX, WY, WZThe white point the XYZ values relate to, for example 0.9505, 1.0 and 1.0890 for the PDF default

Return values

The sRGB colour as a TPDFRGBColor whose Red, Green and Blue lie between 0 and 1

Remarks

A white point that differs from the PDF default of 0.9505, 1.0 and 1.0890 by more than 0.002 in a component is adapted to D65 with a linear Bradford transform. A white point close to the default, or with a component of 0.001 or less, is used without adaptation

The adapted XYZ values pass through the sRGB matrix and the sRGB transfer curve. The result is clamped to the range 0 through 1 and taken from a table with 4096 steps, so each component is quantized to a multiple of 1/4096

The library uses this conversion for CalGray, CalRGB and Lab colour spaces and for mesh shadings with XYZ inputs

See also

ICCComponentTransforms, ICCBasedRendering, ParseICCProfileHeader, ICCProfileComponents