get-image-orientation
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "get-image-orientation", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Utility for determining image orientation", | ||
@@ -5,0 +5,0 @@ "main": "input.js", |
@@ -44,3 +44,3 @@ <!-- Name --> | ||
- maxIncrease - max width/height increase in percentage, default = 15 | ||
- maxIncrease - max width/height increase in percentage, default = 15. `maxIncrease` is used for determining `isSquareLikePortrait` and `isSquareLikeLandscape` flags. | ||
@@ -52,27 +52,27 @@ ## API | ||
Returns a boolean value. Determines if the image has a portrait orientation. An image has a portrait orientation, when `image.width` > `image.height`. | ||
`Boolean`. Determines if the image has a portrait orientation. An image has a portrait orientation, when `image.width` > `image.height`. | ||
### isLandscape | ||
Returns a boolean value. Determines if the image has a landscape orientation. An image has a landscape orientation, when `image.width` < `image.height`. | ||
`Boolean`. Determines if the image has a landscape orientation. An image has a landscape orientation, when `image.width` < `image.height`. | ||
### isSquare | ||
Returns a boolean value. Determines if the image has a square orientation. An image has a square orientation, when `image.width` === `image.height`. | ||
`Boolean`. Determines if the image has a square orientation. An image has a square orientation, when `image.width` === `image.height`. | ||
### widthIncrease | ||
Returns a number value (int). The value represents the width increase, compared to `image.height` in percentage, eg `((width - height) * 100) / width`. Width increase is calculated when `isLandscape` is `true`. Otherwise, it returns `0`. | ||
`Number (int)`. The value represents the width increase, compared to `image.height` in percentage, eg `((width - height) * 100) / width`. Width increase is calculated when `isLandscape` is `true`. Otherwise, it returns `0`. | ||
### heightIncrease | ||
Returns a number value (int). The value represents the height increase, compared to `image.width` in percentage, eg `((height - width) * 100) / height`. Height increase is calculated when `isPortrait` is `true`. Otherwise, it returns `0`. | ||
`Number (int)`. The value represents the height increase, compared to `image.width` in percentage, eg `((height - width) * 100) / height`. Height increase is calculated when `isPortrait` is `true`. Otherwise, it returns `0`. | ||
### isSquareLikePortrait | ||
Returns a boolean value. Determines if the image has a square-like portrait orientation. An image has a square-like portrait orientation, when that image `isPortrait` and its `heightIncrease` is less than `maxIncrease`. In other words, this check returns true for near-square portrait images, with height just a bit bigger than its width. This check is useful for differentiating standard portrait images from square-like images. | ||
`Boolean`. Determines if the image has a square-like portrait orientation. An image has a square-like portrait orientation, when that image `isPortrait` and its `heightIncrease` is less than `maxIncrease`. In other words, this check returns true for near-square portrait images, with height just a bit bigger than its width. This check is useful for differentiating standard portrait images from square-like images. | ||
### isSquareLikeLandscape | ||
Returns a boolean value. Determines if the image has a square-like landscape orientation. An image has a square-like landscape orientation, when that image `isLandscape` and its `widthIncrease` is less than `maxIncrease`. This check returns true for near-square landscape images, with width just a bit bigger than its height. This check is useful for differentiating standard landscape images from square-like images. | ||
`Boolean`. Determines if the image has a square-like landscape orientation. An image has a square-like landscape orientation, when that image `isLandscape` and its `widthIncrease` is less than `maxIncrease`. This check returns true for near-square landscape images, with width just a bit bigger than its height. This check is useful for differentiating standard landscape images from square-like images. | ||
@@ -79,0 +79,0 @@ ## Tests |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14628
9