Skip to main content

decode

Function decode 

Source
pub fn decode(
    bytes: &[u8],
) -> Result<(DynamicImage, Option<ImageFormat>), ImageError>
Expand description

Decodes an image, with its pixels upright by its EXIF orientation.

The API ignores the orientation, so the pixels must be upright.

ยงErrors

Returns the ImageError of the decoder. Returns ImageError::Limits if the pixels need more than 512 MiB of memory, before the decode allocates them.