Table of Contents

Enum ToneMapping

Namespace
Egami.Colors
Assembly
Egami.dll

How HDR light above reference white is brought into the 0..1 range of an SDR encoding.

public enum ToneMapping

Fields

Bt2390 = 0

The EETF of ITU-R BT.2390: a Hermite knee in PQ space, applied to max(R, G, B) so hue holds, that leaves darker tones alone and rolls highlights off smoothly to reference white. For photos and video frames.

Clip = 2

Clamps to 1. For tests, and for callers doing their own mapping.

Reinhard = 1

Extended Reinhard on max(R, G, B), with its white point at the source peak: simple and predictable.

Examples

// HDR to SDR tone maps by default (BT.2390, source peak from the file's mDCV/cLLI, else 1,000 cd/m²).
using Raster<Rgb8> web = hdr.ConvertColor<Rgb8>(ColorProfile.Srgb);

// Or choose the curve and peak; Clip turns tone mapping off.
using Raster<Rgb8> soft = hdr.ConvertColor<Rgb8>(ColorProfile.Srgb, new ColorTransformOptions { ToneMapping = ToneMapping.Reinhard, SourcePeakNits = 4000 });

// Linear HDR pixels (1.0 = reference white, 203 cd/m²) can be tone mapped in place.
using Raster<RgbaF32> linear = hdr.ConvertColor<RgbaF32>(ColorProfile.LinearSrgb, new ColorTransformOptions { ToneMapping = ToneMapping.Clip });
linear.Apply(ops => ops.ToneMap(ToneMapping.Bt2390, sourcePeakNits: 1000));