Table of Contents

Class HdrDecode

Namespace
Egami.Formats
Assembly
Egami.dll

How to read the HDR rendition of an image with a gain map, for Hdr.

public sealed record HdrDecode : IEquatable<HdrDecode>
Inheritance
HdrDecode
Implements
Inherited Members

Examples

// As stored: the SDR base image, with the gain map in the metadata.
using Raster sdr = Raster.Load("ultrahdr.jpg");
GainMap? map = sdr.Metadata.GainMap;                                     // null for a plain JPEG

// The HDR rendition for a display 4x as bright as SDR white: linear half floats, 1.0 = SDR white.
using Raster<RgbaF16> hdr = Raster.Load<RgbaF16>("ultrahdr.jpg", options: new ReaderOptions { Hdr = new HdrDecode { Headroom = 4 } });

// The same from a raster in hand, at the map's full capacity.
using Raster<RgbaF16> full = map!.Apply(sdr);

Properties

Headroom

Gets the display headroom to render for: the display's peak over SDR white, linear (4 for a display four times as bright as SDR white), or null (the default) for the gain map's full HDR capacity.

public double? Headroom { get; init; }

Property Value

double?