- Timestamp:
- Feb 7, 2006, 7:42:30 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_b1/psLib/src/imageops/psImageStructManip.c
r5676 r6373 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $11 * @date $Date: 200 5-12-05 21:05:20 $10 * @version $Revision: 1.7.6.1 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-02-08 05:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 psS32 inputColOffset; // offset in bytes to first subset pixel in input row 34 34 35 if ( col0 < 0 || row0 <0 ) {35 if ( col0 < image->col0 || row0 < image->row0 ) { 36 36 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, 37 37 // PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID); … … 56 56 57 57 if (col1 < 1) { 58 col1 = image-> numCols + col1;58 col1 = image->col0 + image->numCols + col1; 59 59 } 60 60 if (row1 < 1) { 61 row1 = image->numRows + row1; 62 } 63 61 row1 = image->row0 + image->numRows + row1; 62 } 63 64 // XXX should we be allowed to request a zero-sized image? 64 65 if ( col1 <= col0 || 65 66 row1 <= row0 || 66 col0 >= image-> numCols ||67 row0 >= image-> numRows ||68 col1 > image-> numCols ||69 row1 > image-> numRows ) {67 col0 >= image->col0 + image->numCols || 68 row0 >= image->row0 + image->numRows || 69 col1 > image->col0 + image->numCols || 70 row1 > image->row0 + image->numRows ) { 70 71 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 71 72 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID, … … 83 84 84 85 if (image->parent != NULL) { // if this is a child, we need to start working with parent. 85 col0 += image->col0; 86 col1 += image->col0; 87 row0 += image->row0; 88 row1 += image->row0; 86 // XXX EAM : we now treat the region as parent coordinates 87 // col0 += image->col0; 88 // col1 += image->col0; 89 // row0 += image->row0; 90 // row1 += image->row0; 89 91 image = (psImage*)image->parent; 90 92 }
Note:
See TracChangeset
for help on using the changeset viewer.
