O'Reilly logo

ImageMagick Tricks by Sohail Salehi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mogrify Syntax and Options

Mogrify uses almost the same options and the same syntax that the Convert utility but the main difference between these two utilities is:

Convert can save the image processing tasks in a new file but Mogrify overwrites them on the file that it is working on. Here is the syntax:

mogrify [ options ...] file

Another difference between these two utilities is that we can make some graphic with convert, define a canvas for it and save the result in a file whose name and format we specify but mogrify only works on existing files. It is unable to create a new file. For example if do not already have a file named line.bmp then the following command will produce an error:

mogrify size 80x100 xc:white draw 'line 10,10 70,90' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required