Changeset 14523
- Timestamp:
- Aug 15, 2007, 4:51:09 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageStructManip.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageStructManip.c
r12998 r14523 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2007-0 4-24 22:27:17$10 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2007-08-16 02:51:09 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 if ( col0 < image->col0 || row0 < image->row0 ) { 51 51 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); 54 55 return NULL; 55 56 } … … 75 76 row1 > image->row0 + image->numRows ) { 76 77 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]."), 78 79 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); 80 81 return NULL; 81 82 } … … 88 89 // if this is a child, we need to start working with parent pixels 89 90 // the subset region (col0,row0 - col1,row1) is in the parent frame 90 if (image->parent != NULL) { 91 if (image->parent != NULL) { 91 92 image = (psImage*)image->parent; 92 93 } … … 145 146 } 146 147 147 psImage* psImageCopyView(psImage *output, psImage *input) 148 psImage* psImageCopyView(psImage *output, psImage *input) 148 149 { 149 150 psRegion region = {0, 0, 0, 0}; 150 151 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); 154 155 return result; 155 156 }
Note:
See TracChangeset
for help on using the changeset viewer.
