Reputation: 383
I am using magick
library in R.
I am using the following command but it is not working correctly
shoe <- image_read('F:/photo.jpg')
image_scale(shoe,'382x509')
format width height colorspace filesize
JPEG 382 460 sRGB 0
The width is set to 382 but not height. so I set height by following command
image_scale(shoe,'X509')
format width height colorspace filesize
JPEG 423 509 sRGB 0
Now it changed the width. Is there any way to turn off the aspect ratio while resizing?
Upvotes: 9
Views: 5940