Index: imageapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi.module,v
retrieving revision 1.23
diff -u -p -r1.23 imageapi.module
--- imageapi.module	16 Nov 2008 07:16:11 -0000	1.23
+++ imageapi.module	30 Jan 2009 22:51:38 -0000
@@ -213,8 +213,9 @@ function imageapi_image_scale(&$image, $
     $width = $height / $aspect;
   }
 
-  $width = (int) round($width);
-  $height = (int) round($height);
+  // Width and height must be at least one pixel.
+  $width = max(1, (int) round($width));
+  $height = max(1, (int) round($height));
 
   return call_user_func($image->toolkit .'_image_resize', $image, $width, $height);
 }
Index: imageapi_gd.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi_gd.module,v
retrieving revision 1.13.2.1
diff -u -p -r1.13.2.1 imageapi_gd.module
--- imageapi_gd.module	7 Jan 2009 01:37:31 -0000	1.13.2.1
+++ imageapi_gd.module	30 Jan 2009 22:51:38 -0000
@@ -169,7 +169,7 @@ function _gd_create_tmp($image, $width, 
     // if indexed transparency, lets preserve it.
     if ($transparent >= 0) {
       // get color(r,g,b) for index;
-      $transparent = imagecolorsforindex($image->res, $transparent);
+      $color = imagecolorsforindex($image->res, $transparent);
       // allocate to new image and get new index.
       $transparent =  (isset($color['alpha'])) 
         ? imagecolorallocatealpha($res, $color['red'], $color['green'], $color['blue'], $color['alpha'])
