IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2015, 8:49:25 AM (11 years ago)
Author:
eugene
Message:

rice and gzip2 both work for images; working on tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/matrix/F_compress_M.c

    r38362 r38363  
    173173
    174174  // size of a pixel in the image tile -- this is probably not needed
    175   // int tile_pixsize = abs(header[0].bitpix) / 8;
    176   // fprintf (stderr, "raw_pixsize: %d, cmp_pixsize: %d, tile_pixsize: %d, raw_bitpix: %d\n", raw_pixsize, cmp_pixsize, tile_pixsize, raw_bitpix);
     175# if VERBOSE_DUMP
     176  int tile_pixsize = abs(header[0].bitpix) / 8;
     177  fprintf (stderr, "raw_pixsize: %d, cmp_pixsize: %d, tile_pixsize: %d, raw_bitpix: %d\n", raw_pixsize, cmp_pixsize, tile_pixsize, raw_bitpix);
     178# endif
    177179
    178180  // allocate the buffer for compression work
     
    210212
    211213    // gzip compresses bytes which are in BIG-ENDIAN order
     214    // Nraw is number of pixels
    212215    if (!strcasecmp(zcmptype, "GZIP_1")) {
    213       // Nraw is number of pixels
    214216      if (!gfits_byteswap_zdata (raw, Nraw * raw_pixsize, raw_pixsize)) ESCAPE;
    215217    }
     
    238240    // compression modes require swapping after compression (compresssion & decompression
    239241    // operate on native ENDIAN)
    240     if (strcasecmp(zcmptype, "GZIP_1") && strcasecmp(zcmptype, "GZIP_2")) {
     242    if (strcasecmp(zcmptype, "GZIP_1") && strcasecmp(zcmptype, "GZIP_2") && strcasecmp(zcmptype, "RICE_1")) {
    241243      // Nzdata is number of bytes
    242244      if (!gfits_byteswap_zdata (zdata, Nzdata, cmp_pixsize)) ESCAPE;
Note: See TracChangeset for help on using the changeset viewer.