Index: imageapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi.module,v
retrieving revision 1.15.2.4
diff -u -p -r1.15.2.4 imageapi.module
--- imageapi.module	7 Jun 2008 23:02:18 -0000	1.15.2.4
+++ imageapi.module	16 Jun 2008 20:25:46 -0000
@@ -188,7 +188,11 @@ function imageapi_image_scale(&$image, $
   $aspect = $image->info['height'] / $image->info['width'];
   if (empty($height)) $height = $width / $aspect;
   if (empty($width)) $width = $height * $aspect;
-   
+  
+  // round width/height values
+  $width = round($width);
+  $height = round($height);
+  
   // Don't scale up.
   if (!$upscale && $width >= $image->info['width'] && $height >= $image->info['height']) {
     return true;
@@ -223,6 +227,11 @@ function imageapi_image_scale(&$image, $
  *   true or false, based on success.
  */
 function imageapi_image_resize(&$image, $width, $height) {
+  
+  // round width/height values
+  $width = round($width);
+  $height = round($height);
+  
   return call_user_func($image->toolkit .'_image_resize', $image, $width, $height);
 }
  
@@ -268,7 +277,11 @@ function imageapi_image_crop(&$image, $x
   $aspect = $image->info['height'] / $image->info['width'];
   if (empty($height)) $height = $width / $aspect;
   if (empty($width)) $width = $height * $aspect;
-
+  
+  // round width/height values
+  $width = round($width);
+  $height = round($height);
+  
   // Ensure target image size is not greater than original size.
   if ($width > $image->info['width']) {
     $width = $image->info['width'];
