Forget the Interface: The Magic of ImageMagick
All the tools we've explored earlier in this book have user interfaces. However, graphics work, including photo editing, doesn't always require a user interface—especially if you're doing a bulk edit on images. For some purposes, you'll want a set of tools that can be run directly from the command line in whatever operating system you're using. The king of image manipulation from the command line is, in my opinion, ImageMagick.
Figure 13-10. Color sampling application with graphical image
ImageMagick is a software suite that allows us to create and edit images of all types, including SVG, TIFF, PDF, the webby JPEG (including JPEG-2000), GIF, and PNG. The suite can be downloaded and is documented at http://www.imagemagick.org. It can be installed from source on Unix and Windows, and from binary releases for Unix, Windows, and Mac OS X.
The suite's application interface is accessible via several language-specific libraries, including libraries for Ruby, PHP, Python, Perl, Java, C++, and even Ada and Pascal. If you program in it, chances are there's a library for working with ImageMagick. However, once the suite is installed, you can access its functionality directly from the command line, which is the approach I'll use first to demonstrate the capabilities of ImageMagick before diving into the programming aspects.
Figure 13-11. Color sampling ...
Get Painting the Web now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.