Changeset 6805 for trunk/psLib/src/imageops/psImagePixelExtract.c
- Timestamp:
- Apr 5, 2006, 6:12:27 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImagePixelExtract.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r6778 r6805 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-04-0 5 01:49:40$10 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-04-06 04:12:27 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 351 351 region.y0, input->row0, input->row0+input->numRows-1); 352 352 return NULL; 353 } 354 355 //If [0,0,0,0] specified, the whole image is to be included 356 if (row0 == 0 && col0 == 0 && row1 == 0 && col1 == 0) { 357 row0 = input->row0; 358 col0 = input->col0; 359 row1 = input->row0 + input->numRows; 360 col1 = input->col0 + input->numCols; 353 361 } 354 362 … … 667 675 float row1 = region.y1; 668 676 677 //If [0,0,0,0] specified, the whole image is to be included 678 if (row0 == 0 && col0 == 0 && row1 == 0 && col1 == 0) { 679 row0 = input->row0; 680 col0 = input->col0; 681 row1 = input->row0 + input->numRows; 682 col1 = input->col0 + input->numCols; 683 } 684 669 685 //Make sure x0 of region is inside image. If so, set col0 to corresponding index number. 670 686 if (col0 >= input->col0 && col0 < (input->col0 + input->numCols) ) { … … 831 847 } 832 848 833 if (x < 0 || x >= numCols || 834 y < 0 || y >= numRows) { 849 // if (x < 0 || x >= numCols || 850 // y < 0 || y >= numRows) { 851 if (x < input->col0 || x >= (input->col0 + numCols) || 852 y < input->row0 || y >= (input->row0 + numRows) ) { 835 853 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 836 854 PS_ERRORTEXT_psImage_CENTER_NOT_IN_IMAGE,
Note:
See TracChangeset
for help on using the changeset viewer.
