Index: /trunk/psLib/test/image/tst_psImage.c
===================================================================
--- /trunk/psLib/test/image/tst_psImage.c	(revision 1681)
+++ /trunk/psLib/test/image/tst_psImage.c	(revision 1682)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-31 19:36:02 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-02 21:17:03 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -526,4 +526,5 @@
     psImage* img2 = NULL;
     psImage* img3 = NULL;
+    psImage* img4 = NULL;
     unsigned int c = 128;
     unsigned int r = 256;
@@ -550,4 +551,27 @@
         psError(__func__,"the image given for recycled wasn't");
         return 1;
+    }
+
+    // Verify the returned psImage structure is the same type as the input image structure
+    // if the specified output argument is NULL.
+    img4 = psImageCopy(NULL,img,PS_TYPE_F32);
+    if (img4 == NULL) {
+        psError(__func__,"output image doesn't exist");
+        return 4;
+    }
+    if (img4->type.type != img->type.type) {
+        psError(__func__,"output image is not the same type as input image");
+        return 4;
+    }
+    for (unsigned int row=0;row<r;row++) {
+        psF32* imgInRow = img->data.F32[row];
+        psF32* imgOutRow = img4->data.F32[row];
+        for (unsigned col=0;col<c;col++) {
+            if( imgInRow[col] != imgOutRow[col] ) {
+                psError(__func__,"Input image not equal to output image at %d,%d!",
+                        col, row);
+                return 4;
+            }
+        }
     }
 
@@ -632,4 +656,6 @@
     psFree(img);
     psFree(img2);
+    psFree(img3);
+    psFree(img4);
 
     return 0;
