Index: imagerotate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imagerotate.inc,v
retrieving revision 1.3.4.1
diff -u -p -r1.3.4.1 imagerotate.inc
--- imagerotate.inc	13 Feb 2009 00:06:21 -0000	1.3.4.1
+++ imagerotate.inc	13 Feb 2009 01:40:14 -0000
@@ -71,13 +71,13 @@ function imagerotate(&$im, $angle, $bgco
   imagesavealpha($rotate, true);
 
   switch ($angle) {
-    case 270:
+    case 90:
       $rot_width--;
       for ($y = 0; $y < $height; ++$y)
         for ($x = 0; $x < $width; ++$x)
           imagesetpixel($rotate, $rot_width - $y, $x, imagecolorat($im, $x, $y));
       break;
-    case 90:
+    case 270:
       $rot_height--;
       for ($y = 0; $y < $height; ++$y)
         for ($x = 0; $x < $width; ++$x)
Index: imageapi_gd.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi_gd.module,v
retrieving revision 1.13.2.2
diff -u -p -r1.13.2.2 imageapi_gd.module
--- imageapi_gd.module	6 Feb 2009 09:27:48 -0000	1.13.2.2
+++ imageapi_gd.module	13 Feb 2009 01:40:14 -0000
@@ -94,7 +94,7 @@ function imageapi_gd_image_resize(&$imag
 }
 
 function imageapi_gd_image_rotate(&$image, $degrees, $bgcolor) {
-  $res = imagerotate($image->res, 360 - $degrees, $bgcolor);
+  $res = imagerotate($image->res, $degrees, $bgcolor);
   imagedestroy($image->res);
   $image->res = $res;
   return true;
