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
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).
kind:method, kind:property, kind:ctor. Press Esc to clear.BitsPerComponentGets the logical bits per component n: raw values run from 0 to 2^n − 1.ComponentsGets the number of components per sample.IsInvertedGets a value indicating whether the first component maps 0 above 2^n − 1 (Dmin > Dmax): for an image mask, a sample 1 paints.Create(ReadOnlySpan<Double>, Int32, Int32)Compiles a Decode array.Map(Int32, Int32)Maps one raw value of component component.Map(ReadOnlySpan<Byte>, Span<Single>)Maps interleaved raw values; value i belongs to component i mod Components.Map(ReadOnlySpan<UInt16>, Span<Single>, ReadOnlySpan<ComponentRange>)Maps interleaved raw values and clamps each result to its component's range.Map(ReadOnlySpan<UInt16>, Span<Single>)Maps interleaved raw values of any depth; value i belongs to component i mod Components.MapToIndices(ReadOnlySpan<UInt16>, Span<Byte>, Int32)Maps the raw values of a one-component Indexed image to table indices: rounded (half up) and clamped to 0 through highValue.