pub const fn read_header(bytes: &[u8]) -> Result<Header, HeaderError>Expand description
Reads the size of a PNG or JPEG image, and validates the image.
The rules are those of Image::new without the image feature.
ยงErrors
Returns the HeaderError of the first rule that the image breaks.