IccColorTransformOptions Class
Immutable options of an ICC color conversion (IccColorTransform).
public sealed class IccColorTransformOptionsConstructors
| Name | Description |
|---|---|
| IccColorTransformOptions() |
IccColorTransformOptions()
IccColorTransformOptions.cspublic IccColorTransformOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| BlackPointCompensation | Gets a value indicating whether the black point of the source is mapped to the black point of the destination, so that shadow detail is kept when the destination cannot reproduce the black of the source. Defaults to true. It has no effect with IccRenderingIntent.AbsoluteColorimetric. |
| ClipFloatingPointSamples | Gets a value indicating whether IccColorTransform.Convert clips the samples to [0, 1]. Defaults to true. |
| Default | Gets the default options: media-relative colorimetric intent with black point compensation. |
| GamutMapping | Gets how the colors that the destination cannot reproduce are brought into its gamut. Defaults to GamutMapping.Clip, which clips each channel. |
| Intent | Gets the rendering intent. Defaults to IccRenderingIntent.RelativeColorimetric. |
| ToneMapping | Gets how high dynamic range samples are brought to the standard dynamic range of the destination profile, or null (the default) to refuse to convert them. |
BlackPointCompensation
IccColorTransformOptions.csGets a value indicating whether the black point of the source is mapped to the black point of the destination, so that shadow detail is kept when the destination cannot reproduce the black of the source. Defaults to true. It has no effect with IccRenderingIntent.AbsoluteColorimetric.
public bool BlackPointCompensation { get; init; }Property value
Remarks
The compensation scales CIEXYZ toward the white point, following the algorithm published by Adobe and standardized as ISO 18619. The black point of a profile is estimated from its conversion tables or tone curves; when both are black, as between two display profiles, nothing changes. A table-based destination that cannot be converted back to the profile connection space has no measurable black point and is not compensated.
The perceptual and saturation tables of a version 4 profile give black the lightness of the perceptual reference medium (L* = 3.1373), where version 2 tables and matrix-based profiles usually give it 0. The compensation maps one to the other; without it, nothing does: converting from a version 4 table to a version 2 or matrix-based profile turns black into a dark gray, and the reverse makes the darkest grays black. Some color management systems, such as LittleCMS, compensate a version 4 destination even when asked not to.
ClipFloatingPointSamples
IccColorTransformOptions.csGets a value indicating whether IccColorTransform.Convert clips the samples to [0, 1]. Defaults to true.
public bool ClipFloatingPointSamples { get; init; }Property value
Remarks
With false, the floating-point samples keep the values outside [0, 1] that high dynamic range colors (light above the white) and wide-gamut colors (a color that the destination primaries reach with a negative component) have, at the source and at the destination. The tone curves are extended: in [0, 1] they are evaluated as usual, above 1 the function of a parametric curve continues and a sampled curve goes on with the slope of its last interval, and below 0 the curve is mirrored through its value at 0 (-f(-x) for a curve through 0, the extended transfer functions of CSS Color 4). The matrices have no range. A value that is not a number is read as 0.
Only conversions made of tone curves and matrices can do so (matrix-based profiles, the RGB and grayscale profiles of displays and color spaces): a conversion through a lookup table (an AToB or BToA table, a profile connection space in CIELAB) and a gamut mapping other than GamutMapping.Clip are refused by IccColorTransform.Create. The 8-bit and 16-bit conversions always cover the whole range of their type, which the option does not change.
Default
IccColorTransformOptions.csGets the default options: media-relative colorimetric intent with black point compensation.
public static IccColorTransformOptions Default { get; }Property value
GamutMapping
IccColorTransformOptions.csGets how the colors that the destination cannot reproduce are brought into its gamut. Defaults to GamutMapping.Clip, which clips each channel.
public GamutMapping GamutMapping { get; init; }Property value
Exceptions
ArgumentOutOfRangeException- The value is not a defined
GamutMapping.
Remarks
The mapping happens in the profile connection space, after black point compensation and the rescaling of the ICC-absolute colorimetric intent, right before the conversion to the device values of each destination profile (each profile of a sequence that is entered from the connection space). See GamutMapping for the destinations it applies to.
Gets the rendering intent. Defaults to IccRenderingIntent.RelativeColorimetric.
public IccRenderingIntent Intent { get; init; }Property value
Exceptions
ArgumentOutOfRangeException- The value is not a defined
IccRenderingIntent.
Remarks
The intent selects the conversion tables of table-based profiles; a profile that has no table for the intent uses its perceptual table, then its matrix and tone curves. Matrix-based profiles (most RGB and grayscale profiles) give the same result for every intent except IccRenderingIntent.AbsoluteColorimetric, which uses the colorimetric conversion and rescales the colors by the media white points of the two profiles (the illuminant of the profile connection space for a display profile and for a profile without media white point).
ToneMapping
IccColorTransformOptions.csGets how high dynamic range samples are brought to the standard dynamic range of the destination profile, or null (the default) to refuse to convert them.
public HdrToneMappingOptions? ToneMapping { get; init; }Property value
Remarks
It applies to ImageProcessingExtensions.ConvertColorProfile on an image whose samples are PQ or HLG ones: an image without ICC profile whose CICP color description (ImageMetadata.Cicp) declares the transfer characteristics 16 or 18. Such an image is rejected when this is null: compressing the highlights changes the look of the image, which is a choice. It is ignored for every other source, and by IccColorTransform, whose sources are ICC profiles.