Book Image

ImageMagick Tricks

By : Sohail Salehi
Book Image

ImageMagick Tricks

By: Sohail Salehi

Overview of this book

<p>The book is packed with interesting and fun examples. We had a lot of fun coming up with cool ways to demonstrate ImageMagick's power, and we're sure you'll have fun learning how to create them.<br /><br />Although the printed book is in black and white, there is a full colour PDF of the screenshots freely available that includes all of the images in the book. Use it to see exactly what the ImageMagick effects look like in colour, or browse through it and see just what you'll learn to do with this book.<br /><br />ImageMagick is a free software suite to create, edit, and compose bitmap images using text-based commands. The commands can be issued from the command line, but more often will be included in web or desktop applications &acirc;&euro;&ldquo; carrying out complex image-manipulation tasks in response to the user's input.<br /><br />ImageMagick is a popular way for generating images on-the-fly in web pages, whether it's generating thumbnails from a large image, or creating complex combinations of images, text, and effects chosen by a visitor or the web site's creator.</p>
Table of Contents (18 chapters)
ImageMagick Tricks
Credits
About the Author
About the Reviewers
Preface
5
Identify, Display, and Import
Index

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' line.bmp

The error message will say:

mogrify: unable to open image `line.bmp': No such file or directory.

But using the same parameters with convert as shown below will produce a file named line.bmp and -draw a line on it:

convert -size 80x100...