Now available: better control over ImageMagick operations

Events happening in the community are now at Drupal community events on www.drupal.org.
zoo33's picture

Image Enhanced Scaling is dead – long live ImageMagick Advanced Options! Yes, the Long Module Names Movement is back with longer names than ever before!

As of Octover 10, Image module comes with a new contributed module: ImageMagick Advanced Options. This is good news for anyone who needs fine-grained control over their images in Drupal, such as photographers or managers of image archives – regardless of wheter they use Image module or not. This post describes how it came into existence and why you should use it.

Image Enhanced Scaling is a module that taps into Image module's node operations and regenerates its derivative images in a better way. The result is sharper images and better color accuracy if it's configured properly. It's been around for a while and has served me and others quite well. However the implementation has always been something of a hack which meant bad performance out of the box and being very vulnerable to changes in Image module.

Recently there was some talk in the Image issue queue about adding functionality to the ImageMagick image toolkit and drewish invited me to work on that. The result was a new hook in the toolkit which lets modules alter the command line options used when running ImageMagick. Using that, we built ImageMagick Advanced Options, a new bundled module which adds a whole list of options to the image toolkit settings page.

The advantages of this module compared to Image Enhanced Scaling is that it's more stable and it performs better. It doesn't redo Image module's image operations, but rather works with the toolkit itself to tune its settings. Another advantage is that other modules may use the same hook to add their own options without spoiling those that this module sets up.

However the perhaps biggest benefit of the new implementation is that the advanced options are used on all image operations in Drupal – not just in Image module. It doesn't actually depend on Image, so you can enable ImageMagick Advanced Options by itself if you for example use CCK image fields and Imagecache rather than Image.

I think this will be a good feature for a subset of power users while we're still using the current image toolkit solution. Whatever the new image solution will be for Drupal 7, I hope we can provide similar ways for modules to control different aspects of the image operations.

I'd like to thank drewish for working on this and for the addition of the new hook which is what makes it all possible.

Now, go download: drupal.org/project/image

Comments

Wow, thanks for the work on

aaron's picture

Wow, thanks for the work on this! Can't wait to use it. Are there plans by anyone to give better support to other toolkits as well?

Aaron Winborn
Advomatic, Web Design for Progressive Advocacy, Grassroots Movements, and Really Cool Causes

Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic

if by other toolkits you

drewish's picture

if by other toolkits you mean GD not at this point... it'd require either a core patch or replacing the image.gd.inc but i'd be do-able. i think the reason there hasn't been work on it is because GD doesn't really have that many options.

if by other toolkits you mean netpbm, also not at this point... mostly because i'm happy with imagemagick ;) but if you wanted to open an issue in the image module queue we could look at it.

oh yeah, publicity!

drewish's picture

good call announcing the release of the imagemagick advanced module. i always seem to forget about the publicity part.

i really appreciate your work on it. it'd been one of those feature that i'd wanted to see for a while but didn't have the time to take on myself.

andrew

Features

zoo33's picture

Well I just couldn't help myself, I was too excited about this myself to let the world remain unknowing. :)

But I kind of forgot to write about what these new options actually are. Here's the list:

  • JPEG quality
  • Strip metadata to reduce file size
  • Convert to RGB or grayscale
  • Resolution (as in pixels per inch, not pixel size)
  • Sharpening: amount and radius, like Photoshop's unsharp mask
  • Color profile conversion

/ Hannes Lilljequist – SthlmConnection

I just activated

frjo's picture

I just activated "ImageMagick Advanced Options" toolkit on my blog and told Imagecache to fluch all images. All my thumbnails now looks a lot nicer.

Thanks for this contribution zoo33!

Module incompatibility with newer versions of ImageMagick

ivanmilos's picture

I'd just like to point out that there seems to be some kind of incompatibility with newer versions of ImageMagick (6.4.x). It disables the use of ImageMagick. Folks using Menalto Gallery seem to have the same problem since the ImageMagick update.

Also check the thread: http://drupal.org/node/335430

Strip metadata in ImageAPI

Scott J's picture

The description of this module says that "advanced options are used on all image operations in Drupal – not just in Image module", but http://drupal.org/node/547932 suggests that "Strip metadata from images" is not supported for ImageAPI.

Is this true? And if so would it be possible for ImageAPI module to use all "ImageMagick Advanced Options" like Image module does ?

Scott J

Scott Jackson
Wollongong Australia

Image

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: