I would like to resize (only if neccessary) an image to maximum resolution of 800x600. So let's say we have image of resolution 2000x1600 and it will resize to 750x600, but if I have an image of resolution 400x300 it will leave as it is. In other words I need ImageMagick to resize images without upscaling. How can I do this?
convert -resize 800x600 input output
does downscale but also upscale.
Solved it: convert -resize 800x600\> input output
will resize only if width is larger than 800px OR height is larger than 600px.
if you want to resize the current file try mogrify -resize 800x600\> *.jpg
this will resize all jpg images with more than 800 pixels width or 600 height.
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