GraphicsMagick is a replacement for ImageMagick which claims to be more efficient than ImageMagick. Since GraphicsMagick is compatible to ImageMagick 5.5.2 it is not really supported by ImageAPI which supports ImageMagick 6.x - at least as it seems to me.

What differs is the following:

  • Command line syntax: GraphicsMagick is called this way: gm convert ... instead of convert ...
  • Position of command line parameters: It is gm convert [options] input-file output-file instead of convert input-file [options] output-file
  • Some newer (version 6) ImageMagick options like +repage are not working in GraphicsMagick. (At least the module imagecache_actions is using +repage.)

The patch in comment #1 covers the above mentioned differences.

Some notes:

  • To check if ImageMagick or GraphicsMagick is running I decided to just look at the user-entered path in admin/settings/imageapi/config/imageapi_imagemagick. If it ends by /gm (or \gm.exe for Windows OS) it assumes GraphicsMagick. I know from at least Linux Debian that it's GraphicsMagick package creates a /usr/bin/convert symbolic link to the /usr/bin/gm binary. Using that link instead of the binary ImageAPI still assumes ImageMagick is to be used. That probably should be solved by grepping the output of convert -version and setting a Drupal variable instead of relying of the path.
  • Because the use of GraphicsMagick is transparent to modules using ImageAPI (like imagecache_actions) there is no way to let the modules know about it. Therefore I decided to create a replacement mechanism by simply using str_replace() to convert known incompatible options if possible. This is hard coded and also not version dependend. Must be discussed I guess.
CommentFileSizeAuthor
#1 imageapi-1227636-1.patch3.75 KBfuerst
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fuerst’s picture

FileSize
3.75 KB

Here is the patch..

fuerst’s picture

Status: Active » Needs review

Patch needs review of course.

osopolar’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Works as expected.

crea’s picture

Subscribing

crea’s picture

crea’s picture

Issue summary: View changes

Make text more clear