DecodingStrictness Enum

Selects how the decoders treat files that deviate from their specification (ImageConfiguration.DecodingStrictness).

public enum DecodingStrictness

Remarks

The mode applies to every operation that reads a file: identification, eager loads, sequential readers and collections. It never changes the resource limits: a file read leniently is charged and bounded exactly like a file read strictly.

Fields

NameValueDescription
Strict0A file that deviates from its specification throws an InvalidImageContentException. This is the default.
Lenient1The decoders accept a documented list of deviations that the reference decoders and the browsers accept, and repair them the way those decoders do (the list is in the format reference of the library). A deviation whose repair would be ambiguous, or would invent pixels, is still an InvalidImageContentException.