TryReadHeader(ReadOnlySpan, ImageFilterContext, out ImageHeader) Method

Definition

Reads the codestream's header without decoding the samples.

public bool TryReadHeader(ReadOnlySpan<byte> encoded, ImageFilterContext context, scoped out ImageHeader header)

Parameters

encoded
ReadOnlySpan<Byte>

The data the filter would decode.

context
ImageFilterContext

The image's dictionary values, limits and the filter context.

header
ImageHeader

The image's size and components as the codestream declares them.

Returns

Boolean
false when the header cannot be read; DecodeImage(ReadOnlyMemory<Byte>, ImageFilterContext) is then not called.

Remarks

ITU-T T.81 §B.2.2 (frame header: X, Y, Nf, P); ISO 32000-2 §8.9.5.1 Table 87 (always 8 bits per component). The header says the image decodes at 1/2, 1/4 and 1/8 too (MaxReduction 3).