Skip to main content

Crate rosetta_squint_decode

Crate rosetta_squint_decode 

Source
Expand description

rosetta-squint-decode — byte-exact PIL-compatible image decoders.

v0.1.0 supports BMP + PNG. See SPEC.md in the shared /spec/ directory.

Structs§

DecodeError
Error type returned by decode.
DecodedImage
Result of a successful Decode call.

Enums§

Channels
Number of color channels in a DecodedImage’s pixel buffer.
DecodeErrorKind
Categorizes decode failures.
Format
Image format tag.

Constants§

MAX_PIXELS
Maximum number of pixels (width * height) accepted by any decoder. Images whose declared dimensions exceed this limit are rejected with DecodeErrorKind::ImageTooLarge before any size-proportional allocation. 256 MiB / 1 byte-per-channel = 268_435_456 pixels.

Functions§

decode
Decode auto-detects the format from magic bytes and decodes.
detect_format
Returns the Format if the magic bytes match, else None.
supported_formats
Returns the list of formats this port can decode.