« How to List Subcategories for a Single Category | Main | Hackathon 07 NYC »

Installing Image::Magick on Windows

Image::Magick is one of the Perl modules you can optionally install for use with Movable Type. With this module in place and working correctly, Movable Type can create thumbnails of any of the images you upload. Images as thumbnails help your pages load faster and help reduce visual clutter because large images can be resized so they don't push the text of your entries away. Installing Image::Magick on a *nix machine is pretty routine if you are into perl package management, but on Windows it can be tricky.

Installing Perl and ImageMagick on Windows sounds easy enough. Download the installers (Perl [1], ImageMagick [2]), click a few times and you're ready. At least, in theory. Unfortunately, this has not been the experience for many people, including myself. Sometimes Image::Magick wouldn't show up in ActiveState's Perl Package Manager (ppm) after the install had finished. Other times mt-check.cgi seemed to choke on it, using up all memory or simply saying Image::Magick wasn't there, even after ppm claimed it was. Or if mt-check could in fact find it, sometimes Movable Type itself would pretend it was not there, not offering any thumbnailing options when uploading an image (and/or eating up all memory). In short, enough to pull your hair out.

That's when one of my colleagues at Six Apart support pointed out something I had completely missed: during the installation process of ImageMagick, you are asked if you want to install PerlMagick for ActivePerl. You need to do this to get Perl to work with Image::Magick, so I did. But the installer didn't tell me to verify if the build number of the installed ActivePerl corresponds to the build number the ImageMagick installer wants to install PerlMagick for. And there is the rub...

imagemagick-819.gif

At the time of writing, the latest installer for ActivePerl you can download at the ActivePerl site is for build 820. But they also offer previous builds for download here [3]. So after I uninstalled build 820, downloaded build 819, uninstalled ImageMagick and reinstalled it, suddenly everything just worked fine.

If this doesn't work for you, try rebooting the machine. I have heard from people where that suddenly cleared everything up, so who knows, it might be the case for you too...

Moral of the story: if you want to use ImageMagick on Windows with Movable Type, either use the correct build of ActivePerl or wait until an ImageMagick installer becomes available that links to your build.

[1] http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca
[2] http://www.imagemagick.org/script/binary-releases.php#windows
[3] http://ftp.activestate.com/ActivePerl/Windows/5.8/

Comments (1)

I'm just starting out with a photoblog. Every photoblog that I see has Browse/Achive pages with thumbnails. How are these pages generated? If in image magick...how?

Post a comment

(If you haven't left a comment here before, your comment may need to be approved before will appear on the entry. Thanks for waiting.)