Changeset 21438 for trunk/magic/remove/src/warpedpixels.c
- Timestamp:
- Feb 10, 2009, 11:33:02 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/warpedpixels.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/warpedpixels.c
r21156 r21438 22 22 int n = psArrayLength(skycells); 23 23 24 psRegion bounds = *pmChipPixels(sf->chip);24 psRegion *bounds = pmChipPixels(sf->chip); 25 25 26 int width = bounds.x1 - bounds.x0; 27 int height = bounds.y1 - bounds.y0; 26 int width = bounds->x1 - bounds->x0; 27 int height = bounds->y1 - bounds->y0; 28 29 psFree(bounds); 28 30 29 31 sf->warpedPixels = psImageAlloc(width, height, PS_TYPE_U8); … … 35 37 36 38 addTouchedPixels(sf, resolved_name); 39 psFree(resolved_name); 37 40 } 38 41 … … 48 51 psFitsWriteImage(fits, header, sf->warpedPixels, 0, NULL); 49 52 psFitsClose(fits); 53 psFree(header); 50 54 } 51 55 return true; … … 62 66 } 63 67 psMetadata *header = psFitsReadHeader(NULL, fits); 68 psFitsClose(fits); 64 69 if (!header) { 65 70 psError(PS_ERR_IO, false, "failed to read fixts header from skycell file: %s", fileName); … … 75 80 int naxis2 = psMetadataLookupS32(NULL, header, "NAXIS2"); 76 81 82 psFree(header); 83 77 84 /* now set up our wrapper to the chip astrometry to apply to the whole chip */ 78 85 sf->astrom = streakSetAstrometry(sf->astrom, sf->stage, sf->inAstrom->fpa, sf->chip, false, NULL, … … 111 118 pt[i].y = p.y; 112 119 } 120 121 psFree(wcs); 113 122 114 123 // put the corners in the desired order (see comments below)
Note:
See TracChangeset
for help on using the changeset viewer.
