34 g2int j, nbits, width, height;
47 ifld = calloc(ndpts,
sizeof(
g2int));
48 ctemp = calloc(ndpts * 4, 1);
51 fprintf(stderr,
"Could not allocate space in jpcunpack.\n Data field NOT upacked.\n");
54 dec_png(cpack, &width, &height, ctemp);
55 gbits(ctemp, ifld, 0, nbits, 0, ndpts);
56 for (j = 0; j < ndpts; j++)
57 fld[j] = (((
g2float)ifld[j] * bscale) + ref) * dscale;
63 for (j = 0; j < ndpts; j++)
void gbits(unsigned char *in, g2int *iout, g2int iskip, g2int nbyte, g2int nskip, g2int n)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
Header file for NCEPLIBS-g2c library.
int64_t g2int
Long integer type.
double int_power(double x, g2int y)
Function similar to C pow() power function.
int dec_png(unsigned char *, g2int *, g2int *, char *)
Decode PNG.
g2int pngunpack(unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, g2float *fld)
This subroutine unpacks a data field that was packed into a PNG image format using info from the GRIB...
void rdieee(g2int *rieee, g2float *a, g2int num)
This subroutine reads a list of real values in 32-bit IEEE floating point format.