pub fn checked_dimensions(bytes: &[u8]) -> Result<(u32, u32), String>
Read dimensions without allocating a decoded bitmap.