ImageDecodeMap Class

Definition

An image's Decode mapping, compiled once per image: raw sample values to colour component values, y = Dmin + x × (Dmax − Dmin) / (2^n − 1). Immutable and thread-safe; mapping allocates nothing.

public sealed class ImageDecodeMap

Remarks

ISO 32000-2 §8.9.5.2, Table 88. Get one from CreateDecodeMap(DecodedImage), which resolves the image's default array and the codec's polarity, or build one from an array with Create(ReadOnlySpan<Double>, Int32, Int32). Depths up to 8 bits use a lookup table per component; 16-bit values are computed.

The results are not clamped: a Decode array may map outside a component's range (§8.9.5.2 allows Dmin and Dmax outside it), and the values are clamped to the nearest allowed value when the colour is used. Map(ReadOnlySpan<UInt16>, Span<Single>, ReadOnlySpan<ComponentRange>) does both at once. For an Indexed image use MapToIndices(ReadOnlySpan<UInt16>, Span<Byte>, Int32), which rounds and clamps to the table (§8.6.6.3).

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (3)

Methods (6)