Better image thumbnails with MagickWand

February 14th, 2007 in Developer Diary

We have recently improved our gallery views by making the thumbnails larger and clearer, thanks to switching from PHP’s GD library to Magickwand, a PHP API for ImageMagick.

Features of now having larger thumbnails in the gallery views:

Magickwand thumbnail

Example thumbnail

  • 20% larger thumbs: now 146×90 px (was 130×80 px)
  • better image quality - a lot clearer, better colors and more detail
  • 30% smaller file size -> faster loading of gallery views

Read more about this in the forum (and how to clear your browser’s cache to expel the old small size thumbs): http://www.thebroth.com/forum/viewtopic.php?p=5892

The improvement of large artwork thumbnails was made possible thanks to using a different graphics library than before. We used to use PHP’s built-in GD library, but we’ve now switched over to the vastly more powerful Magickwand library.

Magickwand’s documentation can be considered to be somewhere between “sparse” and “non-existent”. There’s a whole bunch of functions (434 different Magickwand functions, can you believe it?!) and they are each somewhat documented, but how to actually achieve anything at all in concert, that appears to be somewhat of a secret.

How to use ImageMagick for PHP

We recently achieved some loading, resizing, positioning, framing, rectangling, etc using MagickWand with our live active rooms preview image. If there’s interest, I’ll post the whole source code in the developer blog.

In fact, I think I’ll write a whole bunch of developer blog entries (or a whole darn book!) on how to use ImageMagick for PHP. I bet other programmers have had similar challenges trying to wrap their minds around how to use that beast.

If you’re used to GD library (or if you’re unfamiliar with graphics libraries), I can tell you, it’s not all that obvious how to use Magickwand for even the simplest graphics tasks, let’s just say that. :-)

Share this:
  • del.icio.us
  • StumbleUpon
  • Furl
  • Netscape
  • Reddit
  • Technorati
  • YahooMyWeb

2 Responses to “Better image thumbnails with MagickWand”

cryogenic15 Feb 07

If I have 20% larger thumbs won’t my fingers feel a little jealous?

Bubba1 May 07

I’m interested in the code - I need to create some simple thumbnails, but my head ain’t wrapping around it so well.

Leave a comment