MapToIndices(ReadOnlySpan, Span, Int32) Method

Definition

Assembly Broadside.dll

Maps the raw values of a one-component Indexed image to table indices: rounded (half up) and clamped to 0 through highValue.

public void MapToIndices(ReadOnlySpan<ushort> raw, Span<byte> indices, int highValue)

Parameters

raw
ReadOnlySpan<UInt16>

Raw values.

indices
Span<Byte>

At least as many bytes.

highValue
Int32

The colour table's highest index (HighValue).

Remarks

ISO 32000-2 §8.9.5.2 (the Decode mapping) and §8.6.6.3: "rounded to the nearest integer ... clipped to the range 0 to hival".