|Status:||reviewed & tested by the community|
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
- Position of command line parameters: It is
gm convert [options] input-file output-fileinstead 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.
- 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 -versionand 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.