IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 29, 2004, 10:17:58 AM (22 years ago)
Author:
desonia
Message:

changes associated with the testing of psImageSubsection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageExtraction.c

    r1924 r1929  
    99 *  @author Robert DeSonia, MHPCC
    1010 *
    11  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-29 01:10:27 $
     11 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-29 20:17:58 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565                   PS_ERR_BAD_PARAMETER_VALUE, true,
    6666                   PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
    67                    col0, col1, row0, row1,
    68                    image->numCols, image->numRows);
     67                   col0, col1-1, row0, row1-1,
     68                   image->numCols-1, image->numRows-1);
    6969        return NULL;
    7070    }
     
    166166        return NULL;
    167167    }
    168     return imageSubset(NULL,image,col0,row0,col1,row1);
     168
     169    if (col0 > col1 || row0 > row1) {
     170        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageSubsection",
     171                   PS_ERR_BAD_PARAMETER_VALUE, true,
     172                   PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED,
     173                   col0,col1,row0,row1);
     174        return NULL;
     175    }
     176
     177    return imageSubset(NULL,image,col0,row0,col1+1,row1+1);
    169178}
    170179
Note: See TracChangeset for help on using the changeset viewer.