IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18869


Ignore:
Timestamp:
Aug 1, 2008, 4:50:41 PM (18 years ago)
Author:
Paul Price
Message:

Don't write header keywords particular to compressed images in ordinary uncompressed images.

Location:
trunk/psLib/src/fits
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsHeader.c

    r18421 r18869  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-07-04 03:18:06 $
     9 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-08-02 02:50:41 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747// List of FITS header keys not to write (handled by cfitsio); NULL-terminated
    4848static const char *noWriteFitsKeys[] = { "SIMPLE", "XTENSION", "BITPIX", "NAXIS", "EXTNAME", "BSCALE",
    49                                          "BZERO", "TFIELDS", "PCOUNT", "GCOUNT", "PSBITPIX", NULL };
     49                                         "BZERO", "TFIELDS", "PCOUNT", "GCOUNT", "PSBITPIX", "BLANK", NULL };
    5050
    5151// List of the start of FITS header keys not to write (handled by cfitsio); NULL-terminated
     
    5353
    5454// List of compressed FITS header keys not to write (handled by cfitsio); NULL-terminated
    55 static const char *noWriteCompressedKeys[] = { "ZBITPIX", "ZIMAGE", "ZBITPIX", "ZCMPTYPE", NULL };
     55static const char *noWriteCompressedKeys[] = { "ZBITPIX", "ZIMAGE", "ZBITPIX", "ZCMPTYPE", "ZSIMPLE",
     56                                               "ZEXTEND", "ZBLANK", NULL };
    5657
    5758// List of the start of FITS header keys not to write (handled by cfitsio); NULL-terminated
     
    555556
    556557            // Options for compression
    557             if (compress != PS_FITS_COMPRESS_NONE &&
    558                 (!fits->options || fits->options->conventions.compression)) {
     558            if (!fits->options || fits->options->conventions.compression) {
    559559                // Check to see if the keyword should be translated
    560560                name = (char*)keywordUntranslate(name, compressTranslation); // Casting away const for cfitsio
  • trunk/psLib/src/fits/psFitsImage.c

    r18590 r18869  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-07-17 03:34:22 $
     9 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-08-02 02:50:41 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    623623    }
    624624
    625     if (blank != 0) {
     625    if (blank != 0 && bitPix > 0) {
    626626        // Some quantisation has taken place --- record the blank ("magic") pixel value
    627627        char *keyword = (psFitsCompressionGetType(fits) != PS_FITS_COMPRESS_NONE &&
Note: See TracChangeset for help on using the changeset viewer.