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 HdrToneMappingOptions

Remarks

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

NameDescription
HdrToneMappingOptions()

HdrToneMappingOptions()

HdrToneMappingOptions.cs
public HdrToneMappingOptions()

No documentation is available.

Properties

NameDescription
DefaultGets the default options: the curve of Report ITU-R BT.2390, a peak derived from the image, and a white of 203 cd/m2.
OperatorGets the curve that compresses the highlights. Defaults to HdrToneMappingOperator.Bt2390.
SourcePeakLuminanceGets 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.
TargetWhiteLuminanceGets 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).

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.

public static HdrToneMappingOptions Default { get; }

Property value

HdrToneMappingOptions

Gets the curve that compresses the highlights. Defaults to HdrToneMappingOperator.Bt2390.

public HdrToneMappingOperator Operator { get; init; }

Property value

HdrToneMappingOperator

Exceptions

ArgumentOutOfRangeException
The value is not a defined HdrToneMappingOperator.

SourcePeakLuminance

HdrToneMappingOptions.cs

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.

public double? SourcePeakLuminance { get; init; }

Property value

double?

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.cs

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).

public double TargetWhiteLuminance { get; init; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not a positive finite number, or is above 10,000.