Changeset 3671 for trunk/psLib/src/image/psImage.c
- Timestamp:
- Apr 5, 2005, 3:12:58 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r3446 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.6 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-18 02:35:14$11 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 35 35 if (image == NULL) { 36 36 return; 37 }38 39 if (image->type.type == PS_TYPE_PTR) {40 // 2-D array of pointers -- must dereference elements41 psU32 oldNumRows = image->numRows;42 psU32 oldNumCols = image->numCols;43 psPtr* rowPtr;44 45 for (psU32 row = 0; row < oldNumRows; row++) {46 rowPtr = image->data.PTR[row];47 for (psU32 col = 0; col < oldNumCols; col++) {48 psMemDecrRefCounter(rowPtr[col]);49 }50 }51 37 } 52 38 … … 188 174 } 189 175 190 if (old->type.type == PS_TYPE_PTR) {191 // 2-D array of pointers -- must192 // dereference193 psU32 oldNumRows = old->numRows;194 psU32 oldNumCols = old->numCols;195 psPtr* rowPtr;196 197 for (psU32 row = 0; row < oldNumRows; row++) {198 rowPtr = old->data.PTR[row];199 for (psU32 col = 0; col < oldNumCols; col++) {200 psMemDecrRefCounter(rowPtr[col]);201 rowPtr[col] = NULL;202 }203 }204 }205 206 176 /* image already the right size/type? */ 207 177 if (numCols == old->numCols && numRows == old->numRows && … … 263 233 elements = numRows * numCols; 264 234 elementSize = PSELEMTYPE_SIZEOF(inDatatype); 265 266 if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {267 psError(PS_ERR_BAD_PARAMETER_TYPE, true,268 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,269 PS_TYPE_PTR_NAME);270 psFree(output);271 return NULL;272 }273 235 274 236 output = psImageRecycle(output, numCols, numRows, type);
Note:
See TracChangeset
for help on using the changeset viewer.
