Index: /trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- /trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 6804)
+++ /trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 6805)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-05 01:49:40 $
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-06 04:12:27 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -351,4 +351,12 @@
                 region.y0, input->row0, input->row0+input->numRows-1);
         return NULL;
+    }
+
+    //If [0,0,0,0] specified, the whole image is to be included
+    if (row0 == 0 && col0 == 0 && row1 == 0 && col1 == 0) {
+        row0 = input->row0;
+        col0 = input->col0;
+        row1 = input->row0 + input->numRows;
+        col1 = input->col0 + input->numCols;
     }
 
@@ -667,4 +675,12 @@
     float row1 = region.y1;
 
+    //If [0,0,0,0] specified, the whole image is to be included
+    if (row0 == 0 && col0 == 0 && row1 == 0 && col1 == 0) {
+        row0 = input->row0;
+        col0 = input->col0;
+        row1 = input->row0 + input->numRows;
+        col1 = input->col0 + input->numCols;
+    }
+
     //Make sure x0 of region is inside image.  If so, set col0 to corresponding index number.
     if (col0 >= input->col0 && col0 < (input->col0 + input->numCols) ) {
@@ -831,6 +847,8 @@
     }
 
-    if (x < 0 || x >= numCols ||
-            y < 0 || y >= numRows) {
+    //    if (x < 0 || x >= numCols ||
+    //            y < 0 || y >= numRows) {
+    if (x < input->col0 || x >= (input->col0 + numCols) ||
+            y < input->row0 || y >= (input->row0 + numRows) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psImage_CENTER_NOT_IN_IMAGE,
Index: /trunk/psLib/test/imageops/tst_psImageGeomManip.c
===================================================================
--- /trunk/psLib/test/imageops/tst_psImageGeomManip.c	(revision 6804)
+++ /trunk/psLib/test/imageops/tst_psImageGeomManip.c	(revision 6805)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-04 19:52:54 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-06 04:12:27 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1089,5 +1089,5 @@
         }
     }
-
+    in->col0 = 1;
     psImage* out = psImageTransform(NULL,
                                     NULL,
@@ -1096,5 +1096,5 @@
                                     0,
                                     trans,
-                                    psRegionSet(0,cols*2,0,rows*2),
+                                    psRegionSet(1,1+cols*2,0,rows*2),
                                     NULL,
                                     PS_INTERPOLATE_FLAT,
@@ -1123,9 +1123,9 @@
         for (psS32 col=0;col<cols;col++) {
             float inValue = p_psImagePixelInterpolateFLAT_F32(in,
-                            col*trans->x->coeff[1][0]+trans->x->coeff[0][0],
+                            col*trans->x->coeff[1][0]+trans->x->coeff[0][0]+1,
                             row*trans->y->coeff[0][1]+trans->y->coeff[0][0],
                             NULL, 0,
                             -1);
-            if (fabsf(outRow[col] - inValue) > FLT_EPSILON*10) {
+            if (fabsf(outRow[col] - inValue) > 0.01) {
                 psError(PS_ERR_UNKNOWN, false,
                         "out at %d,%d was %g, expected %g",
