Expand description
Image format decoders: PNG, JPEG (baseline DCT), GIF (87a/89a)
All decoders are no_std-compatible, use integer/fixed-point math only
(no floating point), and produce pixel buffers suitable for the desktop
compositing pipeline.
§Supported Formats
- PNG: Full critical chunk support (IHDR, PLTE, IDAT, IEND), ancillary chunks (tRNS, gAMA), DEFLATE decompression, all 5 filter types, Adam7 interlacing, color types 0/2/3/4/6, bit depths 1/2/4/8/16
- JPEG: Baseline DCT (SOF0), Huffman entropy coding, integer IDCT, YCbCr-to-RGB via fixed-point, chroma subsampling 4:4:4/4:2:2/4:2:0, restart intervals
- GIF: 87a/89a, LZW decompression, global/local color tables, animation frames, disposal methods, transparency, interlaced rendering
Re-exports§
pub use gif::decode_gif;pub use gif::DecodedGif;pub use gif::GifDisposal;pub use gif::GifFrame;pub use jpeg::decode_jpeg;pub use png::decode_png;
Modules§
- gif
- GIF decoder (87a/89a) with LZW decompression.
- jpeg
- JPEG decoder (Baseline DCT, SOF0).
- png
- PNG decoder with full DEFLATE/zlib decompression.
Structs§
- Decoded
Image - A decoded image frame with RGBA8888 pixels.
Enums§
- Image
Codec Error - Errors produced by the image decoders.
- Image
Codec Format - Detected image codec format.
Functions§
- decode_
image - Auto-detect format and decode.
- detect_
codec_ format - Detect whether data is PNG, JPEG, or GIF.