# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Users/dave/Sites/democrats/trunk/sites/all/modules/contrib/imageapi
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: imageapi_imagemagick.module
--- imageapi_imagemagick.module Base (BASE)
+++ imageapi_imagemagick.module Locally Modified (Based On LOCAL)
@@ -145,6 +145,10 @@
  * Calls the convert executable with the specified filter.
  */
 function _imageapi_imagemagick_convert($source, $dest, $args) {
+  if (in_array(substr($dest, -3), array('gif', 'png'))) {
+    $dest = 'png8:'. $dest ;
+  }
+
   $args['quality'] = '-quality '. escapeshellarg(variable_get('imageapi_imagemagick_quality', 75));
   // To make use of ImageMagick 6's parenthetical command grouping we need to make
   // the $source image the first parameter and $dest the last.
