Index: trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 5174)
+++ trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 5213)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-29 01:15:38 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-30 23:09:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -50,5 +50,5 @@
 psVector *psImageRow(psVector *out,
                      const psImage *input,
-                     psU32 row)
+                     int row)
 {
     if (input == NULL) {
@@ -60,4 +60,12 @@
                 "Specified row number is out of range for specified image.\n");
         return NULL;
+    }
+    if (row < 0) {
+        row += input->numRows;
+        if (row < 0) {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                    "Specified row number is out of range for specified image.\n");
+            return NULL;
+        }
     }
     psVectorRecycle(out, input->numCols, input->type.type);
@@ -137,5 +145,5 @@
 psVector *psImageCol(psVector *out,
                      const psImage *input,
-                     psU32 column)
+                     int column)
 {
     if (input == NULL) {
@@ -143,10 +151,20 @@
         return NULL;
     }
-    if (column >= input->numRows) {
+    if (column >= input->numCols) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 "Specified column number is out of range for specified image.\n");
         return NULL;
     }
-    psVectorRecycle(out, input->numCols, input->type.type);
+    if (column < 0) {
+        column += input->numCols;
+        if (column < 0) {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                    "Specified column number is out of range for specified image.\n");
+            return NULL;
+        }
+    }
+
+
+    psVectorRecycle(out, input->numRows, input->type.type);
 
     switch (input->type.type) {
