Index: trunk/psLib/test/image/tst_psImageManip.c
===================================================================
--- trunk/psLib/test/image/tst_psImageManip.c	(revision 2855)
+++ trunk/psLib/test/image/tst_psImageManip.c	(revision 2860)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 20:18:37 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-03 21:58:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1279,5 +1279,4 @@
     psImage* fOut = NULL;
     psImage* sOut = NULL;
-    psImage* s32Out = NULL;
     psImage* fBiOut = NULL;
     psImage* sBiOut = NULL;
@@ -1290,14 +1289,11 @@
     psImage* fImg = psImageAlloc(cols,rows,PS_TYPE_F32);
     psImage* sImg = psImageAlloc(cols,rows,PS_TYPE_S16);
-    psImage* s32Img = psImageAlloc(cols,rows,PS_TYPE_S32);
 
     for(psS32 row=0;row<rows;row++) {
         psF32* fRow = fImg->data.F32[row];
         psS16* sRow = sImg->data.S16[row];
-        psS32* s32Row = s32Img->data.S32[row];
         for (psS32 col=0;col<cols;col++) {
             fRow[col] = (psF32)(row)+(psF32)(col)/100.0f;
             sRow[col] = row-2*col;
-            s32Row[col] = row-2*col;
         }
     }
@@ -1324,9 +1320,21 @@
     psS32 index = 0;
     psBool fail = false;
+    psF32 radianRot;
     for (psS32 rot=-180;rot<=180;rot+=45) {
         psImage* oldOut = fOut;
         psImage* oldBiOut = fBiOut;
-        fOut = psImageRotate(fOut,fImg,rot,-1.0,PS_INTERPOLATE_FLAT);
-        fBiOut = psImageRotate(fBiOut,fImg,rot,-1.0,PS_INTERPOLATE_BILINEAR);
+
+        if (rot == 90) {
+            radianRot = PS_PI_2;
+        } else if (rot == -90) {
+            radianRot = PS_PI+PS_PI_2;
+        } else if (rot == 180 || rot == -180) {
+            radianRot = PS_PI;
+        } else {
+            radianRot = ((float)rot)*PS_PI/180.0;
+        }
+
+        fOut = psImageRotate(fOut,fImg,radianRot,-1.0,PS_INTERPOLATE_FLAT);
+        fBiOut = psImageRotate(fBiOut,fImg,radianRot,-1.0,PS_INTERPOLATE_BILINEAR);
         // Verify the returned psImage structure is equal to the input
         // parameter out if provided.
@@ -1339,6 +1347,6 @@
             return 4;
         }
-        sOut = psImageRotate(sOut,sImg,rot,-1.0,PS_INTERPOLATE_FLAT);
-        sBiOut = psImageRotate(sBiOut,sImg,rot,-1.0,PS_INTERPOLATE_BILINEAR);
+        sOut = psImageRotate(sOut,sImg,radianRot,-1.0,PS_INTERPOLATE_FLAT);
+        sBiOut = psImageRotate(sBiOut,sImg,radianRot,-1.0,PS_INTERPOLATE_BILINEAR);
         if (! psImageWriteSection(fOut,0,0,0,NULL,index,"temp/fOut.fits") ) {
             psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fOut.fits, so why continue!?");
@@ -1466,16 +1474,4 @@
         }
 
-        // Verify psImage structure returned is NULL and program execution doesn't stop
-        // if the input image type is not supported. Do not check for 0 degree rotation
-        // since an imgae copy will be used.
-        if (rot != 0 ) {
-            psLogMsg(__func__,PS_LOG_INFO,"Following should be an error invalid type for rotate.");
-            s32Out = psImageRotate(s32Out,s32Img,rot,-1.0,PS_INTERPOLATE_FLAT);
-            if( s32Out != NULL ) {
-                psError(PS_ERR_UNKNOWN, true,"psImage returned is not NULL for invalid image type.");
-                return 5;
-            }
-        }
-
         index++;
     }
@@ -1517,6 +1513,4 @@
     psFree(sBiTruth);
     psFree(fBiOut);
-    psFree(s32Img);
-    psFree(s32Out);
 
     return 0;
