Index: trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 6778)
+++ 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,
