--- imageapi.module.old	2008-06-20 00:29:19.000000000 +0200
+++ imageapi.module.new	2008-07-13 21:47:54.000000000 +0200
@@ -17,6 +17,13 @@
  */
 
 /**
+ * Implementation of hook_perm().
+ */
+function imageapi_perm() {
+  return array('administer imageapi');
+}
+
+/**
  * Implementation of hook_menu().
  */
 function imageapi_menu() {
@@ -49,12 +56,12 @@ function imageapi_menu() {
           'title' => $info['name'],
           'page callback' => 'drupal_get_form',
           'page arguments' => array($module .'_settings_form'),
-          'access arguments' => array('administer imageapi'), 
+          'access arguments' => array('administer imageapi'),
           'type' => $module == imageapi_default_toolkit() ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
         );
       }
       else {
-        drupal_set_message(t('ImageAPI toolkit missing settings form'), 'error'); 
+        drupal_set_message(t('ImageAPI toolkit missing settings form'), 'error');
       }
     }
   }
@@ -191,7 +198,7 @@ function imageapi_image_scale(&$image, $
   $aspect = $image->info['height'] / $image->info['width'];
   if (empty($height)) $height = $width / $aspect;
   if (empty($width)) $width = $height * $aspect;
-   
+
   // Don't scale up.
   if (!$upscale && $width >= $image->info['width'] && $height >= $image->info['height']) {
     return true;
@@ -287,7 +294,7 @@ function imageapi_image_desaturate(&$ima
  * Open an image file and return an imageapi image object. Any changes to the
  * file are not saved until imageapi_image_close() is called.
  *
- * @param $file 
+ * @param $file
  *   Path to an image file.
  * @param $toolkit
  *   An optional, image toolkit name to override the default.
@@ -314,7 +321,7 @@ function imageapi_image_open($file, $too
 /**
  * Close the image and save the changes to a file.
  *
- * @param $image 
+ * @param $image
  *   imageAPI image object.
  *
  * @param $destination
@@ -328,7 +335,7 @@ function imageapi_image_close($image, $d
   if ($return = call_user_func($image->toolkit .'_image_close', $image, $destination)) {
     if (@chmod($destination, 0775)) {
       return $return;
-    } 
+    }
     watchdog('imageapi', 'Could not set permissons on destination file: %file', array('%file' => $destination));
   }
   return false;
@@ -339,7 +346,7 @@ function imageapi_image_close($image, $d
  * Convert a hex string to its RGBA (Red, Green, Blue, Alpha) integer
  * components.
  *
- * @param $hex 
+ * @param $hex
  *   A string specifing an RGB color in the formats:
  *   '#ABC','ABC','#ABCD','ABCD','#AABBCC','AABBCC','#AABBCCDD','AABBCCDD'
  * @return
