pub fn decode(data: &[u8], max_side: u32, max_bytes: usize) -> Option<RgbaImage>Expand description
Decodes a picture file’s bytes to RGBA within max_side and
max_bytes (see fit_size). Formats the image crate reads (PNG,
JPEG, TGA, BMP, TIFF, DDS, …) go through it; anything else, and pictures
to be scaled down, through ImageIO on macOS.