pub fn detect_image_format(bytes: &[u8]) -> Result<ImageFormat, DocumentError>Expand description
Detect the encoded image format from magic bytes.
§Errors
Returns DocumentError::UnsupportedInput when the byte payload is not a
supported PNG, JPEG, or TIFF image.