Skip to main content

image_dimensions

Function image_dimensions 

Source
pub fn image_dimensions(bytes: &[u8]) -> Option<(u32, u32)>
Expand description

(width, height) of a PNG or JPEG from its header bytes, without an image crate. None for anything else or a truncated header.