HdrToneMappingOptions Class
Immutable options of the conversion of high dynamic range samples (the PQ and HLG transfer characteristics of a CICP color description) to the standard dynamic range that an ICC profile describes (IccColorTransformOptions.ToneMapping).
public sealed class HdrToneMappingOptionsRemarks
PQ samples (SMPTE ST 2084, Rec. ITU-R BT.2100) are decoded to the light of a display, in candelas per square meter. HLG samples (Rec. ITU-R BT.2100) are decoded to the light of a scene, which the opto-optical transfer function of the recommendation turns into the light of a display whose nominal peak is the peak of the source, with the system gamma of that peak (1.2 at 1,000 cd/m2).
The light is divided by HdrToneMappingOptions.TargetWhiteLuminance, which becomes the white of the converted image, and HdrToneMappingOptions.Operator compresses what is above it. The result is linear light in the color primaries of the source, which is then converted to the destination profile like any other color: a color outside of the gamut of the destination is clipped per channel.
Constructors
| Name | Description |
|---|---|
| HdrToneMappingOptions() |
HdrToneMappingOptions()
HdrToneMappingOptions.cspublic HdrToneMappingOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Default | Gets the default options: the curve of Report ITU-R BT.2390, a peak derived from the image, and a white of 203 cd/m2. |
| Operator | Gets the curve that compresses the highlights. Defaults to HdrToneMappingOperator.Bt2390. |
| SourcePeakLuminance | Gets the luminance of the brightest light of the source, in candelas per square meter, which the curve maps to the white; or null (the default) to derive it from the image. |
| TargetWhiteLuminance | Gets the luminance that becomes the white of the converted image, in candelas per square meter. Defaults to 203, the reference white of high dynamic range programs (Report ITU-R BT.2408). |
Default
HdrToneMappingOptions.csGets the default options: the curve of Report ITU-R BT.2390, a peak derived from the image, and a white of 203 cd/m2.
public static HdrToneMappingOptions Default { get; }Property value
Operator
HdrToneMappingOptions.csGets the curve that compresses the highlights. Defaults to HdrToneMappingOperator.Bt2390.
public HdrToneMappingOperator Operator { get; init; }Property value
Exceptions
ArgumentOutOfRangeException- The value is not a defined
HdrToneMappingOperator.
SourcePeakLuminance
HdrToneMappingOptions.csGets the luminance of the brightest light of the source, in candelas per square meter, which the curve maps to the white; or null (the default) to derive it from the image.
public double? SourcePeakLuminance { get; init; }Property value
Exceptions
ArgumentOutOfRangeException- The value is not a positive finite number, or is above 10,000.
Remarks
When it is not set, the peak of PQ samples is the maximum content light level of the image (ImageMetadata.ContentLightLevel), else the maximum luminance of its mastering display (ImageMetadata.MasteringDisplay), else 10,000 cd/m2, the largest value that PQ encodes. The peak of HLG samples, which is the peak of the display they are shown on, is the maximum luminance of the mastering display, else 1,000 cd/m2. Light above the peak is clipped to the white. A peak below HdrToneMappingOptions.TargetWhiteLuminance is raised to it: nothing is compressed, and nothing is brightened.
TargetWhiteLuminance
HdrToneMappingOptions.csGets the luminance that becomes the white of the converted image, in candelas per square meter. Defaults to 203, the reference white of high dynamic range programs (Report ITU-R BT.2408).
public double TargetWhiteLuminance { get; init; }Property value
Exceptions
ArgumentOutOfRangeException- The value is not a positive finite number, or is above 10,000.