diff --git a/src/image_reader/free_functions.rs b/src/image_reader/free_functions.rs index bf4a3d2341..7e32159a9d 100644 --- a/src/image_reader/free_functions.rs +++ b/src/image_reader/free_functions.rs @@ -124,7 +124,7 @@ pub(crate) fn write_buffer_impl( } } -static MAGIC_BYTES: [(&[u8], ImageFormat); 24] = [ +static MAGIC_BYTES: [(&[u8], ImageFormat); 25] = [ (b"\x89PNG\r\n\x1a\n", ImageFormat::Png), (&[0xff, 0xd8, 0xff], ImageFormat::Jpeg), (b"GIF89a", ImageFormat::Gif), @@ -148,7 +148,8 @@ static MAGIC_BYTES: [(&[u8], ImageFormat); 24] = [ (b"\0\0\0\x1cftypavif", ImageFormat::Avif), (&[0x76, 0x2f, 0x31, 0x01], ImageFormat::OpenExr), // = &exr::meta::magic_number::BYTES (b"qoif", ImageFormat::Qoi), - (&[0x0A], ImageFormat::Pcx), + (&[0x0a, 0x02], ImageFormat::Pcx), + (&[0x0a, 0x05], ImageFormat::Pcx), ]; /// Guess image format from memory block