Chapter 3. Graphics Scripting with Image::Magick

Image::Magick is an object-oriented Perl interface to the ImageMagick image manipulation libraries. It is a more robust collection of tools than GD—in addition to PNGs and JPEGs, it can read and write to many file formats including GIF, PDF, EPS, TIFF, and Photo CD. In fact, Image::Magick is a goldmine of acronyms, with over 60 different file formats supported (see Appendix C for a full accounting).

ImageMagick can handle graphics formats with multiple frames, such as animated GIFs. It can be used effectively in CGI applications, but its real strength is as an off-line workhorse for the batch conversion and manipulation of images. This chapter illustrates both uses and provides a complete overview of the functions available within Image::Magick.

Get Perl Graphics Programming 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.