ImageMagick Mogrify Command-line Tool

Use the mogrify program to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. This tool is similiar to convert except that the original image file is overwritten (unless you change the file suffix with the -format option) with any changes you request. See Command Line Processing for advice on how to structure your mogrify command or see below for sample usages of the command.

Example Usage

We list a few examples of the mogrify command here to illustrate its usefulness and ease of use. To get started, let's reduce the size of our
rose:

$ mogrify -resize 50% rose.jpg

You can resize all your JPEG images in a folder to a maximum dimension of 256x256 with this command:

$ mogrify -resize 256x256 *.jpg

Finally, we convert all our PNG images in a folder to the JPEG format:

$ mogrify -format jpg *.png

Here image files 1.png, 2.png, etc., are left untouched and files 1.jpg, 2.jpg, etc., are created. They are copies of their respective PNG images except are stored in the JPEG image format.