Changeset 17329
- Timestamp:
- Apr 4, 2008, 4:46:10 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageConvolve.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageConvolve.c
r17320 r17329 7 7 /// @author Eugene Magnier, IfA 8 8 /// 9 /// @version $Revision: 1.6 3$ $Name: not supported by cvs2svn $10 /// @date $Date: 2008-04-0 4 22:44:56$9 /// @version $Revision: 1.64 $ $Name: not supported by cvs2svn $ 10 /// @date $Date: 2008-04-05 02:46:10 $ 11 11 /// 12 12 /// Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 418 418 int numRows = mask->numRows, numCols = mask->numCols; // Size of image 419 419 420 if (!psMemIncrRefCounter(out)) {421 out = psImageAlloc(numCols, numRows, PS_TYPE_MASK);422 }423 424 420 psImage *onoff = psImageAlloc(numCols, numRows, PS_TYPE_F32); // Pixels on or off 425 421 psImageInit(onoff, 0); … … 439 435 if (!convolved) { 440 436 psError(PS_ERR_UNKNOWN, false, "Unable to convolve mask."); 441 psFree(out);442 437 return NULL; 443 438 } 444 445 thresh *= maskVal;446 439 447 440 if (!setVal) { … … 449 442 } 450 443 444 if (!out) { 445 out = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 446 } 451 447 for (int y = 0; y < numRows; y++) { 452 448 for (int x = 0; x < numCols; x++) { … … 457 453 458 454 psFree(convolved); 459 psFree(out);460 455 461 456 return out;
Note:
See TracChangeset
for help on using the changeset viewer.
