IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14523


Ignore:
Timestamp:
Aug 15, 2007, 4:51:09 PM (19 years ago)
Author:
Paul Price
Message:

Fixing range for error messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageStructManip.c

    r12998 r14523  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-04-24 22:27:17 $
     10 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-08-16 02:51:09 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050    if ( col0 < image->col0 || row0 < image->row0 ) {
    5151        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    52                 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."),
    53                 col0, col1-1, row0, row1-1, image->numCols-1, image->numRows-1);
     52                _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [%d:%d,%d:%d]."),
     53                col0, col1-1, row0, row1-1, image->col0, image->col0 + image->numCols-1, image->row0,
     54                image->row0 + image->numRows-1);
    5455        return NULL;
    5556    }
     
    7576        row1 > image->row0 + image->numRows ) {
    7677        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    77                 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."),
     78                _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [%d:%d,%d:%d]."),
    7879                col0, col1-1, row0, row1-1,
    79                 image->numCols-1, image->numRows-1);
     80                image->col0, image->col0 + image->numCols-1, image->row0, image->row0 + image->numRows-1);
    8081        return NULL;
    8182    }
     
    8889    // if this is a child, we need to start working with parent pixels
    8990    // the subset region (col0,row0 - col1,row1) is in the parent frame
    90     if (image->parent != NULL) { 
     91    if (image->parent != NULL) {
    9192        image = (psImage*)image->parent;
    9293    }
     
    145146}
    146147
    147 psImage* psImageCopyView(psImage *output, psImage *input) 
     148psImage* psImageCopyView(psImage *output, psImage *input)
    148149{
    149150    psRegion region = {0, 0, 0, 0};
    150151    region = psRegionForImage (input, region);
    151     psImage *result = imageSubset (output, input, 
    152                                    region.x0, region.y0,
    153                                    region.x1, region.y1);
     152    psImage *result = imageSubset (output, input,
     153                                   region.x0, region.y0,
     154                                   region.x1, region.y1);
    154155    return result;
    155156}
Note: See TracChangeset for help on using the changeset viewer.