Skip to content

Commit

Permalink
docs(input): correct getNormalSize with EXIF orientation example (#3241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonger authored May 31, 2022
1 parent b91875d commit 4d82331
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ image
const size = getNormalSize(await sharp(input).metadata());

function getNormalSize({ width, height, orientation }) {
return orientation || 0 >= 5
return (orientation || 0) >= 5
? { width: height, height: width }
: { width, height };
}
Expand Down
2 changes: 1 addition & 1 deletion lib/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function _isStreamInput () {
* const size = getNormalSize(await sharp(input).metadata());
*
* function getNormalSize({ width, height, orientation }) {
* return orientation || 0 >= 5
* return (orientation || 0) >= 5
* ? { width: height, height: width }
* : { width, height };
* }
Expand Down

0 comments on commit 4d82331

Please sign in to comment.