How to resize images with the terminal using ImageMagick

Hi Folks,

In this post I cover how to resize images easily with the terminal using ImageMagick. We cover 2 scenarios. The first is if you want to maintain aspect ratio while the second is if you want the resulting image to have a specific width and height, regardless of aspect ratio.

Resizing Images while maintaining Aspect Ratio

You can use a command like

convert -resize 1024X768  source.png dest.jpg

 

Resizing Images without locking Aspect Ratio

The command is similar to the above except that you need to add !. Here is an example.

convert -resize 1024X768!  source.png dest.jpg

That’s all for now. Till next time, happy graphics manipulations.

Leave a Reply

Your email address will not be published. Required fields are marked *