IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 10, 2005, 11:46:46 AM (21 years ago)
Author:
desonia
Message:

fixed bug in psPixels and tested psVectorExtend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psPixels.c

    r4203 r4212  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-09 23:51:49 $
     9 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-10 21:46:46 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    132132
    133133    // determine the output image size
    134     int numRows = x1-x0;
    135     int numCols = y1-y0;
     134    int numRows = y1-y0;
     135    int numCols = x1-x0;
    136136    if (numRows < 1 || numCols < 1) {
    137137        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    138138                PS_ERRORTEXT_psPixels_REGION_INVALID,
    139                 x0,x1,y0,y1);
     139                y0,y1,x0,x1);
    140140        psFree(out);
    141141        return NULL;
     
    150150        return NULL;
    151151    }
    152     *(psS32*)&out->row0 = x0;
    153     *(psS32*)&out->col0 = y0;
     152    *(psS32*)&out->row0 = y0;
     153    *(psS32*)&out->col0 = x0;
    154154
    155155    // initialize image to all zeros
     
    169169        // pixel in region?
    170170        if (x >= x0 && x < x1 && y >= y0 && y < y1) {
    171             outData[x-x0][y-y0] |= maskVal;
     171            outData[y-y0][x-x0] |= maskVal;
    172172        }
    173173    }
Note: See TracChangeset for help on using the changeset viewer.