⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module image_codecs

Module image_codecs 

Source
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§

DecodedImage
A decoded image frame with RGBA8888 pixels.

Enums§

ImageCodecError
Errors produced by the image decoders.
ImageCodecFormat
Detected image codec format.

Functions§

decode_image
Auto-detect format and decode.
detect_codec_format
Detect whether data is PNG, JPEG, or GIF.