pub fn png_intrinsic_size(bytes: &[u8]) -> Option<Vec2>Expand description
The intrinsic size of a PNG, read straight from its IHDR chunk — no decoder
needed. A PNG is the 8-byte signature followed by the IHDR chunk, whose data
begins at byte 16: width is the big-endian u32 at bytes 16..20 and height at
bytes 20..24. None if the signature is wrong, the header is truncated, or a
dimension is zero.