Esc

jpeg_read_info

procedureextensionsince 0.36.1Source
  • macOS: jpeg_read_info works on macOS
  • Linux: jpeg_read_info works on Linux
  • Windows: jpeg_read_info works on Windows
  • Wasm: jpeg_read_info works on Wasm

Reads the size and component count from the first frame header without decoding or allocating. max_pixels is checked as decode_jpeg checks it.

Signature

jpeg_read_info :: (
    data: [] u8,
    max_pixels: s64
) -> (info: Image_Info, ok: bool, error: string)

See also