Improvements to HEIF file signature and GIF file extractor

This commit is contained in:
n1474335 2024-04-05 18:11:51 +01:00
parent ef52195167
commit 6ca60cb013
No known key found for this signature in database
GPG Key ID: D15457B7B4AF3F37
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ export const FILE_SIGNATURES = {
0: 0x00,
1: 0x00,
2: 0x00,
// 3 could be 0x24 or 0x18, so skip it
3: [0x24, 0x18],
4: 0x66, // ftypheic
5: 0x74,
6: 0x79,
@ -2748,7 +2748,7 @@ export function extractGIF(bytes, offset) {
stream.moveForwardsBy(11);
// Loop until next Graphic Control Extension.
while (stream.getBytes(2) !== [0x21, 0xf9]) {
while (!Array.from(stream.getBytes(2)).equals([0x21, 0xf9])) {
stream.moveBackwardsBy(2);
stream.moveForwardsBy(stream.readInt(1));
if (!stream.readInt(1))