Skip to content

Commit

Permalink
Fixed measuring dimension for .gif images.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Feb 20, 2021
1 parent 636c89c commit 4903978
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
======= 3.4.9

- fixed measuring dimension for `.gif` images

======= 3.4.8

- fixed: command injection in `Image.pipe()` and `Image.stream()`
Expand Down
2 changes: 1 addition & 1 deletion image.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function u32(buf, o) {
}

exports.measureGIF = function(buffer) {
return { width: buffer[6], height: buffer[8] };
return { width: buffer.readInt16LE(6), height: buffer.readInt16LE(8) };
};

// MIT
Expand Down

0 comments on commit 4903978

Please sign in to comment.