Index: trunk/psLib/src/collections/psPixels.c
===================================================================
--- trunk/psLib/src/collections/psPixels.c	(revision 4203)
+++ trunk/psLib/src/collections/psPixels.c	(revision 4212)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 23:51:49 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -132,10 +132,10 @@
 
     // determine the output image size
-    int numRows = x1-x0;
-    int numCols = y1-y0;
+    int numRows = y1-y0;
+    int numCols = x1-x0;
     if (numRows < 1 || numCols < 1) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psPixels_REGION_INVALID,
-                x0,x1,y0,y1);
+                y0,y1,x0,x1);
         psFree(out);
         return NULL;
@@ -150,6 +150,6 @@
         return NULL;
     }
-    *(psS32*)&out->row0 = x0;
-    *(psS32*)&out->col0 = y0;
+    *(psS32*)&out->row0 = y0;
+    *(psS32*)&out->col0 = x0;
 
     // initialize image to all zeros
@@ -169,5 +169,5 @@
         // pixel in region?
         if (x >= x0 && x < x1 && y >= y0 && y < y1) {
-            outData[x-x0][y-y0] |= maskVal;
+            outData[y-y0][x-x0] |= maskVal;
         }
     }
