diff -r 6022e43bec5d imageapi_imagemagick.module
--- a/imageapi_imagemagick.module	Tue Apr 21 12:57:59 2009 -0500
+++ b/imageapi_imagemagick.module	Sun Nov 08 23:42:30 2009 -0600
@@ -145,11 +145,14 @@ function imageapi_imagemagick_image_desa
  * Calls the convert executable with the specified filter.
  */
 function _imageapi_imagemagick_convert($source, $dest, $args) {
+  global $_SERVER;
+  $dir = str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']);
+
   $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.
   // See http://www.imagemagick.org/Usage/basics/#cmdline for more info.
-  $command = escapeshellarg($source) .' '. implode(' ', $args) .' '. escapeshellarg($dest);
+  $command = escapeshellarg($dir . $source) .' '. implode(' ', $args) .' '. escapeshellarg($dir . $dest);
 
   if (0 != _imageapi_imagemagick_convert_exec($command, $output, $errors)) {
     return FALSE;
