Decode() Method

Definition

Assembly Broadside.dll

Decodes the image's samples.

public DecodedImage? Decode()

Returns

DecodedImage
The samples in the §8.9.3 layout, which the caller disposes; null when the image cannot be decoded: its dictionary lacks what decoding needs, it is larger than MaxImagePixels or MaxDecodedStreamLength allow, or a filter it needs is not available. Each is recorded as a diagnostic.

Remarks

ISO 32000-2 §8.9.3 and §7.4. The filters run through the document's pipeline; when the last one has an image facet (IImageFilter), the codec decodes into the image directly and its header is checked against the limits first. What the codec reports wins over the dictionary for size and depth, with a diagnostic when they differ (§7.4.9).

Short data is decoded as far as it goes and the rest is zero (DecodedRows says how many rows were complete; for an image mask the missing rows paint nothing), with a diagnostic; data beyond the image is ignored. Depths other than 1, 2, 4, 8 and 16 are stored at the next wider depth, values unchanged.