pngpack.c(3) | Library Functions Manual | pngpack.c(3) |
pngpack.c - Pack data with PNG compression.
#include 'grib2_int.h'
#include <math.h>
#include <stdlib.h>
int g2c_pngpackd (double *fld, size_t width, size_t height,
int *idrstmpl, unsigned char *cpack, int *lcpack)
This subroutine packs up a double data field into PNG image format. int
g2c_pngpackf (float *fld, size_t width, size_t height, int *idrstmpl,
unsigned char *cpack, int *lcpack)
This subroutine packs up a float data field into PNG image format. void
pngpack (float *fld, g2int width, g2int height,
g2int *idrstmpl, unsigned char *cpack, g2int *lcpack)
This subroutine packs up a float data field into PNG image format. static int
pngpack_int (void *fld, int fld_is_double, g2int width,
g2int height, g2int *idrstmpl, unsigned char *cpack,
g2int *lcpack, int verbose)
Packs float or double data into PNG image format.
Pack data with PNG compression.
Author
Date
Definition in file pngpack.c.
This subroutine packs up a double data field into PNG image format. After the data field is scaled, and the reference value is subtracted out, it is treated as a grayscale image and passed to a PNG encoder. It also fills in GRIB2 Data Representation Template 5.41 or 5.40010 with the appropriate values.
Parameters
cpack The packed data field.
lcpack length of packed field cpack.
Returns
Author
Date
Definition at line 348 of file pngpack.c.
References G2C_PNG_DRS_TEMPLATE_LEN, and pngpack_int().
This subroutine packs up a float data field into PNG image format. After the data field is scaled, and the reference value is subtracted out, it is treated as a grayscale image and passed to a PNG encoder. It also fills in GRIB2 Data Representation Template 5.41 or 5.40010 with the appropriate values.
Parameters
cpack The packed data field.
lcpack length of packed field cpack.
Returns
Author
Definition at line 294 of file pngpack.c.
References G2C_PNG_DRS_TEMPLATE_LEN, and pngpack_int().
This subroutine packs up a float data field into PNG image format. After the data field is scaled, and the reference value is subtracted out, it is treated as a grayscale image and passed to a PNG encoder. It also fills in GRIB2 Data Representation Template 5.41 or 5.40010 with the appropriate values.
Parameters
cpack The packed data field.
lcpack length of packed field cpack.
Author
Date
Author
Definition at line 254 of file pngpack.c.
References pngpack_int().
Referenced by g2_addfield().
Packs float or double data into PNG image format. This is called by pngpack() and pngpackd().
After the data field is scaled, and the reference value is subtracted out, it is treated as a grayscale image and passed to a PNG encoder. It also fills in GRIB2 Data Representation Template 5.41 or 5.40010 with the appropriate values.
Parameters
cpack The packed data field.
lcpack length of packed field cpack.
verbose If non-zero, error messages will be printed in case of error.
Otherwise, error codes will be return but no error messages printed. Calls
to the original g2c API may cause error messages to be printed in case of
error. For the new g2c_ API, no error messages will be printed - instead an
error code will be returned. Call g2c_strerror() to get the error
message for any error code.
Returns
Author
Date
Definition at line 53 of file pngpack.c.
References ALOG2, enc_png(), G2C_EPNG, G2C_NOERROR, int_power(), LOG, mkieee(), and sbits().
Referenced by g2c_pngpackd(), g2c_pngpackf(), and pngpack().
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.
Version 2.1.0 | NCEPLIBS-g2c |