Changeset 21535 for trunk/psLib
- Timestamp:
- Feb 18, 2009, 5:15:40 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFitsImage.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFitsImage.c
r21183 r21535 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2009-0 1-27 06:39:37$9 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-02-19 03:15:40 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 266 266 *floatType = PS_FITS_FLOAT_NONE; 267 267 268 psFitsOptions *options = fits->options; 268 psFitsOptions *options = fits->options; // Options for FITS writing 269 270 // Can't PLIO compress U16,U32,U64 directly, so convert them 271 if (psFitsCompressionGetType(fits) == PS_FITS_COMPRESS_PLIO && (!options || options->bitpix == 0)) { 272 switch (image->type.type) { 273 case PS_TYPE_U16: 274 return psImageCopy(NULL, image, PS_TYPE_S32); 275 case PS_TYPE_U32: 276 return psImageCopy(NULL, image, PS_TYPE_S64); 277 case PS_TYPE_U64: 278 // Conversion would result in numerical overflow 279 psError(PS_ERR_IO, true, "Unable to compress U64 images"); 280 return NULL; 281 default: 282 // No action 283 ; 284 } 285 } 286 269 287 if (!options) { 270 288 return psMemIncrRefCounter((psImage*)image); // Casting away const
Note:
See TracChangeset
for help on using the changeset viewer.
