Book review: ImageMagick Tricks

255

Author: Mayank Sharma

Command-line utilities can be powerful, but it takes some doing to make a typical desktop user work in the shell. The image manipulation program ImageMagick is one command-line program that gives users a good reason to use the CLI. Now Packt Publishing has released ImageMagick Tricks, a book that covers ImageMagick from the ground up. If you’ve never used ImageMagick before, this book is a good starting place.

The book is written in British English. Its 10 chapters are loaded with black-and-white image illustrations. While most of the illustrated effects can be understood, a few examples that deal with 3-D effects such as shadows fail to get the point across. But an archive of all the screenshots is available for download, along with the code examples in the book.

The chapters are divided into workshops and how-to sections. Introduction to every ImageMagick utility begins with its usage syntax and a complete listing of its options.

After an initial introductory chapter on ImageMagick’s nine core utilities and its application programming interfaces (API), which allow ImageMagick utilities to be used from within scripting languages such as PHP and Perl, author Sohail Salehi devotes a chapter to help readers get the software installed. It lists download links for various Linux distributions, FreeBSD, Solaris, Mac OS X, Windows, and VMS, followed by detailed installation and error-handling instructions.

The next four chapters explain the various ImageMagick utilities. In each chapter, the first examples are very basic, and then get more complex. The workshops and examples in the book are very practical and wherever possible build on the output of the previous chapter’s examples to add new effects.

Since ImageMagick is an X Window application, Microsoft Windows users need to make certain cosmetic changes, such as enclosing parameters in double quotes (“) instead of single quotes (‘). The author notes these differences between the Linux and Windows implementations of each utility as it is introduced.

Chapter 7 covers customizing ImageMagick through its Conjure utility. Conjure is the internal interpreter of ImageMagick that processes scripting code written in Magick Scripting Language (MSL), a variant of XML. Apart from the sample code, the chapter also lists all the elements that can be used with Conjure, along with their attributes, usage, and a brief description of each.

Alternative distribution
In addition to the bound paperback book, you can also buy a PDF version of the text directly from Packt or from several online stores. The ImageMagick project gets a royalty on every sale of the book.

The final three chapters teach readers how to interface ImageMagick with PHP to use it for Web projects. Accessing command-line applications through a Web scripting language and managing multiple users simultaneously is a complex task. These chapters put readers on track with good explanations and practical examples.

Readers will find even the books two appendices useful. Appendix A, about installing new fonts, lists several resources where one can find free fonts, photos, and animations. Appendix B is an interesting discussion on image compression and quality. It explains the lossy and the lossless compression algorithms and the ImageMagick options to use them.

ImageMagick Tricks is for beginners. The book won’t be of much use to an experienced ImageMagick user, since it doesn’t cover anything a seasoned user wouldn’t be aware of. But for newcomers, the discussions, explanations, and examples provided should provide an introduction to the powers of ImageMagick.