IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18271 for trunk/Ohana


Ignore:
Timestamp:
Jun 22, 2008, 8:55:25 AM (18 years ago)
Author:
eugene
Message:

use BYTEPIX in RICE_1 to find pixsize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/matrix/F_compress_M.c

    r18265 r18271  
    200200
    201201  // size of a pixel in the output from the decompression routine
    202   odata_pixsize = gfits_uncompressed_data_pixsize (cmptype, header[0].bitpix);
     202  odata_pixsize = gfits_uncompressed_data_pixsize (cmptype, header[0].bitpix, optname, optvalue, Noptions);
    203203  ALLOCATE (out, char, odata_pixsize*max_tile_size);
    204204
     
    455455}
    456456
    457 int gfits_uncompressed_data_pixsize (char *cmptype, int out_bitpix) {
     457int gfits_uncompressed_data_pixsize (char *cmptype, int out_bitpix, char **optname, char **optvalue, int Noptions) {
     458
     459  int i, Nbyte;
    458460
    459461  if (!strcasecmp(cmptype, "GZIP_1")) {
     
    461463  }
    462464  if (!strcasecmp(cmptype, "RICE_1")) {
     465
     466    // if BYTEPIX option is specified, use that for Nbyte
     467    for (i = 0; i < Noptions; i++) {
     468      if (!strcmp(optname[i], "BYTEPIX")) {
     469        Nbyte = atoi (optvalue[i]);
     470        return (Nbyte);
     471      }
     472    }
     473
    463474    return (4);
    464475  }
Note: See TracChangeset for help on using the changeset viewer.