Index: trunk/psLib/src/image/psImageErrors.dat
===================================================================
--- trunk/psLib/src/image/psImageErrors.dat	(revision 1927)
+++ trunk/psLib/src/image/psImageErrors.dat	(revision 1929)
@@ -14,4 +14,5 @@
 psImage_INTERPOLATE_METHOD_INVALID     Specified interpolation method (%d) is not supported.
 psImage_SUBSET_RANGE_INVALID           Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d].
+psImage_SUBSET_RANGE_MALFORMED         Specified subset range, [%d:%d,%d:%d], is invalid.  Ranges must be incremental.
 psImage_SUBSECTION_NULL                Specified subsection string can not be NULL.
 psImage_SUBSECTION_INVALID             Specified subsection string, '%s', can not be parsed.  Must be in the form '[x1:x2,y1:y2]'.
Index: trunk/psLib/src/image/psImageErrors.h
===================================================================
--- trunk/psLib/src/image/psImageErrors.h	(revision 1927)
+++ trunk/psLib/src/image/psImageErrors.h	(revision 1929)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-28 02:27:58 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-29 20:17:58 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -36,4 +36,5 @@
 #define PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID "Specified interpolation method (%d) is not supported."
 #define PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID "Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."
+#define PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED "Specified subset range, [%d:%d,%d:%d], is invalid.  Ranges must be incremental."
 #define PS_ERRORTEXT_psImage_SUBSECTION_NULL "Specified subsection string can not be NULL."
 #define PS_ERRORTEXT_psImage_SUBSECTION_INVALID "Specified subsection string, '%s', can not be parsed.  Must be in the form '[x1:x2,y1:y2]'."
Index: trunk/psLib/src/image/psImageExtraction.c
===================================================================
--- trunk/psLib/src/image/psImageExtraction.c	(revision 1927)
+++ trunk/psLib/src/image/psImageExtraction.c	(revision 1929)
@@ -9,6 +9,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-29 01:10:27 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-29 20:17:58 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -65,6 +65,6 @@
                    PS_ERR_BAD_PARAMETER_VALUE, true,
                    PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
-                   col0, col1, row0, row1,
-                   image->numCols, image->numRows);
+                   col0, col1-1, row0, row1-1,
+                   image->numCols-1, image->numRows-1);
         return NULL;
     }
@@ -166,5 +166,14 @@
         return NULL;
     }
-    return imageSubset(NULL,image,col0,row0,col1,row1);
+
+    if (col0 > col1 || row0 > row1) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageSubsection",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED,
+                   col0,col1,row0,row1);
+        return NULL;
+    }
+
+    return imageSubset(NULL,image,col0,row0,col1+1,row1+1);
 }
 
