I need to resize an image and the result image should have 300 pixels in height. The image must keep the aspect ratio of the original image.
To specify the height and keep the aspect ratio, use -resize x300
magick in.jpg -resize x300 out.jpg
For more ways to specify the target size, see https://imagemagick.org/Usage/resize/#resize
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With