Index: trunk/psLib/test/image/tst_psImageGeomManip.c
===================================================================
--- trunk/psLib/test/image/tst_psImageGeomManip.c	(revision 4214)
+++ trunk/psLib/test/image/tst_psImageGeomManip.c	(revision 4308)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-11 02:19:05 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-17 23:44:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1077,6 +1077,68 @@
 static psS32 testImageTransform(void)
 {
-
-    /// XXX: TODO
+    int cols = 16;
+    int rows = 32;
+
+    psPlaneTransform* trans = psPlaneTransformAlloc(2,2);
+    trans->x->coeff[1][0] = 0.5;
+    trans->y->coeff[0][1] = 1.5;
+
+    psImage* in = psImageAlloc(cols,rows,PS_TYPE_F32);
+    for (psS32 row=0;row<rows;row++) {
+        psF32* inRow = in->data.F32[row];
+        for (psS32 col=0;col<cols;col++) {
+            inRow[col] = (psF32)row+(psF32)col/1000.0f;
+        }
+    }
+
+    psImage* out = psImageTransform(NULL,
+                                    NULL,
+                                    in,
+                                    NULL,
+                                    0,
+                                    trans,
+                                    psRegionSet(0,cols*2,0,rows*2),
+                                    NULL,
+                                    PS_INTERPOLATE_FLAT,
+                                    -1);
+
+    if (out == NULL) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out == NULL");
+        return 1;
+    }
+    if (out->type.type != PS_TYPE_F32) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out->type.type != PS_TYPE_F32, out->type.type == %d",
+                out->type.type);
+        return 2;
+    }
+    if (out->numRows != rows*2 || out->numCols != cols*2) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out size is %dx%d, not %dx%d",
+                out->numCols, out->numRows, cols*2, rows);
+        return 3;
+    }
+
+    for (psS32 row=0;row<out->numRows;row++) {
+        psF32* outRow = out->data.F32[row];
+        for (psS32 col=0;col<cols;col++) {
+            float inValue = p_psImagePixelInterpolateFLAT_F32(in,
+                            col*trans->x->coeff[1][0]+trans->x->coeff[0][0],
+                            row*trans->y->coeff[0][1]+trans->y->coeff[0][0],
+                            NULL, 0,
+                            -1);
+            if (fabsf(outRow[col] - inValue) > FLT_EPSILON*10) {
+                psError(PS_ERR_UNKNOWN, false,
+                        "out at %d,%d was %g, expected %g",
+                        col,row,outRow[col], inValue);
+                return 4;
+            }
+        }
+    }
+
+    psFree(out);
+    psFree(in);
+    psFree(trans);
     return 0;
 }
