- Timestamp:
- Mar 5, 2009, 11:24:29 AM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090215
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psModules/src/camera/pmFPAWrite.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090215
- Property svn:mergeinfo changed
/trunk merged: 22727-22752,23115-23126,23128,23137-23157,23159-23174,23182-23195,23198
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090215/psModules/src/camera/pmFPAWrite.c
r23197 r23199 692 692 "Centre of covariance matrix in y", -yMinCovar); 693 693 694 // Turn off compression 695 int bitpix = fits->options ? fits->options->bitpix : 0; // Desired bits per pixel 696 psFitsCompression *compress = psFitsCompressionGet(fits); // Current compression options 697 if (!psFitsSetCompression(fits, PS_FITS_COMPRESS_NONE, NULL, 0, 0, 0)) { 698 psError(PS_ERR_UNKNOWN, false, "Unable to set FITS compression to NONE"); 699 psFree(extname); 700 psFree(header); 701 psFree(images); 702 psFree(compress); 703 return false; 704 } 705 if (fits->options) { 706 fits->options->bitpix = 0; 707 } 708 694 709 // Write images 695 710 if (!psFitsWriteImageCube(fits, header, images, extname)) { … … 699 714 psFree(header); 700 715 psFree(images); 716 if (fits->options) { 717 fits->options->bitpix = bitpix; 718 } 719 psFitsCompressionApply(fits, compress); 720 psFree(compress); 701 721 return 0; 702 722 } … … 704 724 psFree(header); 705 725 psFree(images); 726 727 // Restore compression 728 if (fits->options) { 729 fits->options->bitpix = bitpix; 730 } 731 if (!psFitsCompressionApply(fits, compress)) { 732 psError(PS_ERR_UNKNOWN, false, "Unable to set FITS compression to NONE"); 733 psFree(compress); 734 return false; 735 } 736 psFree(compress); 706 737 707 738 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
