Changeset 4589 for trunk/psLib/src/imageops/psImagePixelManip.c
- Timestamp:
- Jul 20, 2005, 3:40:10 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImagePixelManip.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelManip.c
r4544 r4589 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-07- 12 19:33:49$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-21 01:40:10 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 187 187 int psImageOverlaySection(psImage* image, 188 188 const psImage* overlay, 189 int col0,190 int row0,189 int x0, 190 int y0, 191 191 const char *op) 192 192 { … … 229 229 overlayNumRows = overlay->numRows; 230 230 overlayNumCols = overlay->numCols; 231 imageRowLimit = row0 + overlayNumRows;232 imageColLimit = col0 + overlayNumCols;231 imageRowLimit = y0 + overlayNumRows; 232 imageColLimit = x0 + overlayNumCols; 233 233 234 234 /* check to see if overlay is within the input image */ 235 if ( row0 < 0 ||236 col0 < 0 ||235 if ( y0 < 0 || 236 x0 < 0 || 237 237 imageRowLimit > imageNumRows || 238 238 imageColLimit > imageNumCols) { … … 240 240 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 241 241 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID, 242 col0, imageColLimit, row0, imageRowLimit,242 x0, imageColLimit, y0, imageRowLimit, 243 243 imageNumCols, imageNumRows); 244 244 return pixelsOverlaid; … … 247 247 248 248 #define psImageOverlayLoop(DATATYPE,OP) { \ 249 for (int row= row0;row<imageRowLimit;row++) { \249 for (int row=y0;row<imageRowLimit;row++) { \ 250 250 ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \ 251 ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row- row0]; \252 for (int col= col0;col<imageColLimit;col++) { \253 imageRow[col] OP overlayRow[col- col0]; \254 } \ 255 } \ 256 pixelsOverlaid += (imageRowLimit - row0) * (imageColLimit - col0); \251 ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-y0]; \ 252 for (int col=x0;col<imageColLimit;col++) { \ 253 imageRow[col] OP overlayRow[col-x0]; \ 254 } \ 255 } \ 256 pixelsOverlaid += (imageRowLimit - y0) * (imageColLimit - x0); \ 257 257 } 258 258
Note:
See TracChangeset
for help on using the changeset viewer.
