pub fn dimensions(bytes: &[u8]) -> Option<(u32, u32)>Expand description
The pixel size, read from the header — PNG, JPEG, WebP and GIF, no decoder.
This is deliberately a header read and not a decode: it costs nothing, it cannot fail on a valid file the helpers can still open, and the number is only used to tell the model what it has.