Index: /trunk/psLib/src/image/psImageManip.c
===================================================================
--- /trunk/psLib/src/image/psImageManip.c	(revision 1634)
+++ /trunk/psLib/src/image/psImageManip.c	(revision 1635)
@@ -1,3 +1,2 @@
-
 /** @file  psImageManip.c
  *
@@ -11,17 +10,14 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-20 02:55:58 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-27 19:49:54 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
-#include <math.h>                          // for
-// isfinite(),
-// etc.
+
+#include <math.h>                          // for isfinite(), etc.
 #include <stdlib.h>
 #include <stdbool.h>
-#include <string.h>                        // for
-// memcpy,
-// etc.
+#include <string.h>                        // for memcpy, etc.
 
 #include "psError.h"
@@ -594,5 +590,5 @@
                        const psImage* in,
                        float angle,
-                       float unexposedValue,
+                       psC64 unexposedValue,
                        psImageInterpolateMode mode)
 {
@@ -764,8 +760,10 @@
 
         #define PSIMAGE_ROTATE_ARBITRARY_LOOP(TYPE,MODE) { \
-            if (unexposedValue < PS_MIN_##TYPE || unexposedValue > PS_MAX_##TYPE) { \
-                psError(__func__,"The given unexposedValue (%g) is outside of the " \
+            if (creal(unexposedValue) < PS_MIN_##TYPE || creal(unexposedValue) > PS_MAX_##TYPE || \
+                    cimag(unexposedValue) < PS_MIN_##TYPE || cimag(unexposedValue) > PS_MAX_##TYPE) { \
+                psError(__func__,"The given unexposedValue (%g%+g) is outside of the " \
                         "image type's range (%g->%g).", \
-                        unexposedValue, (double)PS_MIN_##TYPE,(double)PS_MAX_##TYPE); \
+                        creal(unexposedValue),cimag(unexposedValue), \
+                        (double)PS_MIN_##TYPE,(double)PS_MAX_##TYPE); \
                 psFree(out); \
                 out = NULL; \
@@ -850,5 +848,5 @@
                       float dx,
                       float dy,
-                      psF64 unexposedValue,
+                      psC64 unexposedValue,
                       psImageInterpolateMode mode)
 {
@@ -870,10 +868,12 @@
     out = psImageRecycle(out, outCols, outRows, type);
 
-    #define PSIMAGE_SHIFT_CASE(TYPE) \
+    #define PSIMAGE_SHIFT_CASE(MODE,TYPE) \
 case PS_TYPE_##TYPE: \
-    if (unexposedValue < PS_MIN_##TYPE || unexposedValue > PS_MAX_##TYPE) { \
-        psError(__func__,"The given unexposedValue (%g) is outside of the " \
+    if (creal(unexposedValue) < PS_MIN_##TYPE || creal(unexposedValue) > PS_MAX_##TYPE || \
+            cimag(unexposedValue) < PS_MIN_##TYPE || cimag(unexposedValue) > PS_MAX_##TYPE) { \
+        psError(__func__,"The given unexposedValue (%g%+g) is outside of the " \
                 "image type's range (%g->%g).", \
-                unexposedValue, (double)PS_MIN_##TYPE,(double)PS_MAX_##TYPE); \
+                creal(unexposedValue), cimag(unexposedValue), \
+                (double)PS_MIN_##TYPE,(double)PS_MAX_##TYPE); \
         psFree(out); \
         out = NULL; \
@@ -884,27 +884,39 @@
         float y = dy+(float)row; \
         for (int col=0;col<outCols;col++) { \
-            outRow[col] = psImagePixelInterpolate(in,dx+(float)col,y,unexposedValue,mode); \
+            outRow[col] = p_psImagePixelInterpolate##MODE##_##TYPE(in,dx+(float)col,y,unexposedValue); \
         } \
     } \
     break;
 
-    switch (in->type.type) {
-        PSIMAGE_SHIFT_CASE(U8);
-        PSIMAGE_SHIFT_CASE(U16);
-        PSIMAGE_SHIFT_CASE(U32);
-        PSIMAGE_SHIFT_CASE(U64);
-        PSIMAGE_SHIFT_CASE(S8);
-        PSIMAGE_SHIFT_CASE(S16);
-        PSIMAGE_SHIFT_CASE(S32);
-        PSIMAGE_SHIFT_CASE(S64);
-        PSIMAGE_SHIFT_CASE(F32);
-        PSIMAGE_SHIFT_CASE(F64);
-        PSIMAGE_SHIFT_CASE(C32);
-        PSIMAGE_SHIFT_CASE(C64);
+    #define PSIMAGE_SHIFT_ARBITRARY_CASE(MODE) \
+case PS_INTERPOLATE_##MODE: \
+    switch (in->type.type) { \
+        PSIMAGE_SHIFT_CASE(MODE,U8); \
+        PSIMAGE_SHIFT_CASE(MODE,U16); \
+        PSIMAGE_SHIFT_CASE(MODE,U32); \
+        PSIMAGE_SHIFT_CASE(MODE,U64); \
+        PSIMAGE_SHIFT_CASE(MODE,S8); \
+        PSIMAGE_SHIFT_CASE(MODE,S16); \
+        PSIMAGE_SHIFT_CASE(MODE,S32); \
+        PSIMAGE_SHIFT_CASE(MODE,S64); \
+        PSIMAGE_SHIFT_CASE(MODE,F32); \
+        PSIMAGE_SHIFT_CASE(MODE,F64); \
+        PSIMAGE_SHIFT_CASE(MODE,C32); \
+        PSIMAGE_SHIFT_CASE(MODE,C64); \
+    default: \
+        psError(__func__, "Image type (%d) not supported.", type); \
+        psFree(out); \
+        out = NULL; \
+    }
+
+    switch (mode) {
+        PSIMAGE_SHIFT_ARBITRARY_CASE(FLAT);
+        PSIMAGE_SHIFT_ARBITRARY_CASE(BILINEAR);
     default:
-        psError(__func__, "Image type (%d) not supported.", type);
+        psError(__func__, "Unsupported interpolation mode (%d)", mode);
         psFree(out);
         out = NULL;
     }
+
     return out;
 }
Index: /trunk/psLib/src/image/psImageManip.h
===================================================================
--- /trunk/psLib/src/image/psImageManip.h	(revision 1634)
+++ /trunk/psLib/src/image/psImageManip.h	(revision 1635)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-20 02:55:58 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-27 19:49:54 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -141,5 +141,5 @@
     const psImage* in,                 ///< input image
     float angle,                       ///< the rotation angle in degrees.
-    float unexposedValue,              ///< the output image pixel values for non-imagery areas
+    psC64 unexposedValue,              ///< the output image pixel values for non-imagery areas
     psImageInterpolateMode mode        ///< the interpolation mode used
 );
@@ -161,5 +161,5 @@
     float dx,                          ///< the shift in x direction.
     float dy,                          ///< the shift in y direction.
-    float unexposedValue,              ///< the output image pixel values for non-imagery areas
+    psC64 unexposedValue,              ///< the output image pixel values for non-imagery areas
     psImageInterpolateMode mode        ///< the interpolation mode to use
 );
