Changeset 5213 for trunk/psLib/src/imageops/psImagePixelExtract.c
- Timestamp:
- Sep 30, 2005, 1:09:13 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImagePixelExtract.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r5174 r5213 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-09- 29 01:15:38$10 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-09-30 23:09:13 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 psVector *psImageRow(psVector *out, 51 51 const psImage *input, 52 psU32row)52 int row) 53 53 { 54 54 if (input == NULL) { … … 60 60 "Specified row number is out of range for specified image.\n"); 61 61 return NULL; 62 } 63 if (row < 0) { 64 row += input->numRows; 65 if (row < 0) { 66 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 67 "Specified row number is out of range for specified image.\n"); 68 return NULL; 69 } 62 70 } 63 71 psVectorRecycle(out, input->numCols, input->type.type); … … 137 145 psVector *psImageCol(psVector *out, 138 146 const psImage *input, 139 psU32column)147 int column) 140 148 { 141 149 if (input == NULL) { … … 143 151 return NULL; 144 152 } 145 if (column >= input->num Rows) {153 if (column >= input->numCols) { 146 154 psError(PS_ERR_BAD_PARAMETER_NULL, true, 147 155 "Specified column number is out of range for specified image.\n"); 148 156 return NULL; 149 157 } 150 psVectorRecycle(out, input->numCols, input->type.type); 158 if (column < 0) { 159 column += input->numCols; 160 if (column < 0) { 161 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 162 "Specified column number is out of range for specified image.\n"); 163 return NULL; 164 } 165 } 166 167 168 psVectorRecycle(out, input->numRows, input->type.type); 151 169 152 170 switch (input->type.type) {
Note:
See TracChangeset
for help on using the changeset viewer.
