Resize images with preserve aspect ratio
This commit is contained in:
parent
56f9cc683a
commit
abffd98e29
4 changed files with 35 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue