Index: imageapi_imagemagick.module
===================================================================
--- imageapi_imagemagick.module	(revision 440)
+++ imageapi_imagemagick.module	(working copy)
@@ -48,6 +48,20 @@
     '#element_validate' => array('imageapi_imagemagick_validate_path'),
   );
 
+  $form['imageapi_imagemagick_binary']['imageapi_imagemagick_prepend_args'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Prepend arguments'),
+    '#default_value' => variable_get('imageapi_imagemagick_prepend_args', ''),
+    '#description' => t('Arguments to add before all other arguments.  For example, specify <kbd>convert</kbd> here and specify the path to the GraphicsMagick <kbd>gm</kbd> binary above.'),
+  );
+
+  $form['imageapi_imagemagick_binary']['imageapi_imagemagick_extra_args'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Extra arguments'),
+    '#default_value' => variable_get('imageapi_imagemagick_extra_args', ''),
+    '#description' => t("Arguments to add after other arguments.  For example, specify <kbd>+profile '*'</kbd> to remove all profiles (ICM, IPTC, etc.) from the converted image."),
+  );
+
   $form['imageapi_imagemagick_binary']['imageapi_imagemagick_debugging'] = array(
     '#type' => 'checkbox',
     '#title' => t('Display debugging information'),
@@ -146,6 +160,12 @@
  */
 function _imageapi_imagemagick_convert($source, $dest, $args) {
   $args['quality'] = '-quality '. escapeshellarg(variable_get('imageapi_imagemagick_quality', 75));
+
+  $extra_args = variable_get('imageapi_imagemagick_extra_args', '');
+  if (!empty($extra_args)) {
+    $args[] = $extra_args;
+  }
+
   // To make use of ImageMagick 6's parenthetical command grouping we need to make
   // the $source image the first parameter and $dest the last.
   // See http://www.imagemagick.org/Usage/basics/#cmdline for more info.
@@ -178,6 +198,12 @@
     return FALSE;
   }
 
+  // Prepend any custom arguments.
+  $prepend_args = variable_get('imageapi_imagemagick_prepend_args', '');
+  if (!empty($prepend_args)) {
+    $convert_path .= ' '. $prepend_args;
+  }
+
   if (strstr($_SERVER['SERVER_SOFTWARE'], 'Win32') || strstr($_SERVER['SERVER_SOFTWARE'], 'IIS')) {
     // Use Window's start command to avoid the "black window" from showing up:
     // http://us3.php.net/manual/en/function.exec.php#56599
