IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2009, 11:42:15 AM (17 years ago)
Author:
bills
Message:

In psFitsCompressionTypeFromString allow matches where the beginning
of the string matches. So RICE_1 matches RICE, GZIP_1 matches GZIP.
This allows comparison to the values that cfitsio puts into headers

File:
1 edited

Legend:

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

    r21431 r24285  
    931931    }
    932932
     933    // use strncmp so that we can resolve the string valuves that cfitsio puts into headers (RICE_1 GZIP_1)
     934    // into psFitsCompressionType
    933935    if (strcmp(string, "NONE") == 0) return PS_FITS_COMPRESS_NONE;
    934     if (strcmp(string, "GZIP") == 0) return PS_FITS_COMPRESS_GZIP;
    935     if (strcmp(string, "RICE") == 0) return PS_FITS_COMPRESS_RICE;
    936     if (strcmp(string, "HCOMPRESS") == 0) return PS_FITS_COMPRESS_HCOMPRESS;
    937     if (strcmp(string, "PLIO") == 0) return PS_FITS_COMPRESS_PLIO;
     936    if (strncmp(string, "GZIP", 4) == 0) return PS_FITS_COMPRESS_GZIP;
     937    if (strncmp(string, "RICE", 4) == 0) return PS_FITS_COMPRESS_RICE;
     938    if (strncmp(string, "HCOMPRESS", 9) == 0) return PS_FITS_COMPRESS_HCOMPRESS;
     939    if (strncmp(string, "PLIO", 4) == 0) return PS_FITS_COMPRESS_PLIO;
    938940
    939941    psWarning("Unable to identify compression type (%s) --- none set.", string);
Note: See TracChangeset for help on using the changeset viewer.