mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
docs(input): correct getNormalSize with EXIF orientation example (#3241)
This commit is contained in:
parent
b91875d3d9
commit
4d82331bf6
@ -69,7 +69,7 @@ image
|
|||||||
const size = getNormalSize(await sharp(input).metadata());
|
const size = getNormalSize(await sharp(input).metadata());
|
||||||
|
|
||||||
function getNormalSize({ width, height, orientation }) {
|
function getNormalSize({ width, height, orientation }) {
|
||||||
return orientation || 0 >= 5
|
return (orientation || 0) >= 5
|
||||||
? { width: height, height: width }
|
? { width: height, height: width }
|
||||||
: { width, height };
|
: { width, height };
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@ function _isStreamInput () {
|
|||||||
* const size = getNormalSize(await sharp(input).metadata());
|
* const size = getNormalSize(await sharp(input).metadata());
|
||||||
*
|
*
|
||||||
* function getNormalSize({ width, height, orientation }) {
|
* function getNormalSize({ width, height, orientation }) {
|
||||||
* return orientation || 0 >= 5
|
* return (orientation || 0) >= 5
|
||||||
* ? { width: height, height: width }
|
* ? { width: height, height: width }
|
||||||
* : { width, height };
|
* : { width, height };
|
||||||
* }
|
* }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user