DecodedImage Class

Definition

The decoded samples of an image: the buffer every image codec fills and the renderer reads. Owns pooled memory; dispose it to return the memory.

public sealed class DecodedImage : IDisposable

Remarks

ISO 32000-2 §8.9.3 sample layout, exactly: Height rows of Stride bytes, each row starting on a byte boundary; within a row the Components components of each sample are interleaved, packed most significant bit first at StorageBits bits each (1, 2, 4, 8 or 16; 16-bit values big-endian); the padding bits at the end of a row are meaningless. Stride is ⌈Width × Components × StorageBits / 8⌉ with no further alignment, so a filter's output is adopted as it is.

The values are the raw samples, before the image's Decode array (§8.9.5.2): ImageDecodeMap applies it. BitsPerComponent is the logical depth, which sets the largest raw value (2^n − 1); a depth the layout cannot store directly (3, 5, 6, 7, 9 to 15, a JPEG 2000 precision) is stored in the next wider unit without scaling.

Built by a DecodedImageBuilder, then immutable: safe for concurrent readers until disposed. Disposing while another thread reads is a caller error.

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

Properties (17)

Methods (2)