Skip to content

Commit

Permalink
Merge pull request #1649 from installgentoo/master
Browse files Browse the repository at this point in the history
Add new magic byte
  • Loading branch information
HeroicKatora committed Jan 12, 2022
2 parents 6301dc6 + 1def719 commit 9ed41d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/io/free_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ pub(crate) fn write_buffer_impl<W: std::io::Write + Seek>(
}
}

static MAGIC_BYTES: [(&[u8], ImageFormat); 21] = [
static MAGIC_BYTES: [(&[u8], ImageFormat); 22] = [
(b"\x89PNG\r\n\x1a\n", ImageFormat::Png),
(&[0xff, 0xd8, 0xff], ImageFormat::Jpeg),
(b"GIF89a", ImageFormat::Gif),
Expand All @@ -273,6 +273,7 @@ static MAGIC_BYTES: [(&[u8], ImageFormat); 21] = [
(b"P7", ImageFormat::Pnm),
(b"farbfeld", ImageFormat::Farbfeld),
(b"\0\0\0 ftypavif", ImageFormat::Avif),
(b"\0\0\0\x1cftypavif", ImageFormat::Avif),
(&[0x76, 0x2f, 0x31, 0x01], ImageFormat::OpenExr), // = &exr::meta::magic_number::BYTES
];

Expand Down

0 comments on commit 9ed41d7

Please sign in to comment.