Skip to content

Commit

Permalink
Merge pull request #12 from Mrazbb/main
Browse files Browse the repository at this point in the history
fix bug Image measureWEBP
  • Loading branch information
petersirka committed Aug 14, 2024
2 parents 7170b1b + f31f73b commit 40cfa17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion images.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ exports.measureWEBP = function(buffer) {
}

if (header === 'VP8 ' && buffer[0] !== 0x2f)
return { width: buffer.readInt16LE(8) & 0x3fff, height: buffer.readInt16LE(6) & 0x3fff };
return { width: buffer.readInt16LE(6) & 0x3fff, height: buffer.readInt16LE(8) & 0x3fff };

var signature = buffer.toString('hex', 3, 6);
if (header === 'VP8L' && signature !== '9d012a')
Expand Down

0 comments on commit 40cfa17

Please sign in to comment.