Replacing Graphics::Magick with Imager

Today I moved Fastmail’s image processing backend (used for attachment thumbnailing and image galleries) from Graphics::Magick to Imager, due to the former’s tendency to crash on some kinds of bogus input, leaving core and data files lying around, filling the disk.

If you are doing image processing in Perl and you’re using GD, Graphics::Magick, Image::Imlib2 or anything else that’s not Imager, you are almost certainly doing wrong.

Reasons to like it:

Its missing a couple of features that I’d like (writing EXIF data and a filter for two-dimensional convolution matrices) but they can be worked around easily enough.

This should be your first choice for image processing in Perl. That is all.


Magick should never have even been a library. It started as a big command line set, and was never structured correctly internally to be used in a long-running process.

Unfortunately pretty much everything that has come along since then trying to fix the problem has ended up making it worse by over-engineering everything so you end up with something slow, or with a crap interface, or with a billion dependencies.

I don’t know if Imager is the right way to do it, but so far its the best I’ve seen for what it does.