Manuscript Documentation
v2026.12.0

@std/image/jpeg.ms#

Import each required symbol with import Name from "@std/image/jpeg.ms".

decode_jpeg Function#

Decodes a baseline or progressive Huffman-coded JPEG with 8-bit samples into a raster of 1 channel (gray) or 3 (RGB); CMYK and YCCK images are converted to RGB. Malformed data returns EBADMSG. An unsupported feature, such as arithmetic coding or another sample precision, returns ENOTSUP, and dimensions past max_pixels or the hard ceiling return EOVERFLOW.

Manuscript
fn decode_jpeg(data Bytes, max_pixels Int? = null) Result[Raster, Error] { ... }