Resize images with preserve aspect ratio

This commit is contained in:
Kevin Sawicki 2016-10-05 09:15:06 -07:00
parent 56f9cc683a
commit abffd98e29
4 changed files with 35 additions and 6 deletions

View file

@ -239,4 +239,11 @@ Returns `NativeImage` - The cropped image.
Returns `NativeImage` - The resized image.
If only the `height` or the `width` are specified then the current aspect ratio
will be preserved in the resized image.
#### `image.getAspectRatio()`
Returns `Float` - The image's aspect ratio.
[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer