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§
- Decode
Error - Error type returned by
decode. - Decoded
Image - Result of a successful Decode call.
Enums§
- Channels
- Number of color channels in a DecodedImage’s pixel buffer.
- Decode
Error Kind - 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::ImageTooLargebefore 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.