Skip to content

Commit

Permalink
Fix parsing big-endian encoded TIFF file (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit authored Jan 8, 2023
1 parent 66860eb commit e8bc341
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ class FileTypeParser {
}

await this.tokenizer.ignore(ifdOffset);
const fileType = await this.readTiffIFD(false);
const fileType = await this.readTiffIFD(bigEndian);
return fileType ?? {
ext: 'tif',
mime: 'image/tiff',
Expand Down
Binary file added fixture/fixture-bali.tif
Binary file not shown.
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const names = {
tif: [
'fixture-big-endian',
'fixture-little-endian',
'fixture-bali',
],
gz: [
'fixture.tar',
Expand Down

0 comments on commit e8bc341

Please sign in to comment.