Skip to main content

decode_image

Function decode_image 

Source
pub fn decode_image(bytes: &[u8]) -> Result<Pixels, String>
Expand description

Decodes PNG, JPEG, WebP or GIF bytes to straight RGBA — an animated file’s first frame. A failure names the format it could not read, or that the bytes are none of the four.