Index: imageapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi.module,v
retrieving revision 1.6
diff -u -u -p -r1.6 imageapi.module
--- imageapi.module	21 Feb 2008 12:26:36 -0000	1.6
+++ imageapi.module	20 Mar 2008 18:13:18 -0000
@@ -296,5 +296,11 @@ function imageapi_image_open($file, $too
 }
 
 function imageapi_image_close($image, $destination) {
-  return call_user_func($image->toolkit .'_image_close', $image, $destination);
+  if ($return = call_user_func($image->toolkit .'_image_close', $image, $destination)) {
+    if (@chmod($image->source, 0775)) {
+      return $return;
+    } 
+    watchdog('imageapi', t('Could not set permissons on destination file: %file', array('%file' => $image->source)));
+  }
+  return FALSE;
 }
Index: imageapi_imagick.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi_imagick.module,v
retrieving revision 1.3
diff -u -u -p -r1.3 imageapi_imagick.module
--- imageapi_imagick.module	21 Feb 2008 12:26:36 -0000	1.3
+++ imageapi_imagick.module	20 Mar 2008 18:13:18 -0000
@@ -51,7 +51,7 @@ function imageapi_imagick_image_open($im
 
 function imageapi_imagick_image_close($image, $destination) {
   try {
-   $image->res->writeImage($destination);
+   return $image->res->writeImage($destination);
   }
   catch(Exception $e) {
     //print_r($e);
