Table of Contents

Enum GainMapFormat

Namespace
Egami.Colors
Assembly
Egami.dll

Where a gain map's metadata came from.

public enum GainMapFormat

Fields

AdobeXmp = 1

Adobe's hdrgm XMP (Ultra HDR 1.0).

Apple = 2

Apple's HDRGainMap auxiliary image, with the headroom from the maker note or XMP.

Iso21496 = 0

ISO 21496-1 metadata, the standard Android, Chrome, Apple and libultrahdr write.

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