Scroll to navigation

pngunpack.c(3) NCEPLIBS-g2c pngunpack.c(3)

NAME

pngunpack.c

SYNOPSIS

#include <stdio.h>
#include <stdlib.h>
#include 'grib2.h'

Functions


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 GRIB2 Data Representation Template 5.41 or 5.40010.

Detailed Description

Author

Stephen Gilbert

Date

2003-08-27

Definition in file pngunpack.c.

Function Documentation

int dec_png (unsigned char * pngbuf, g2int * width, g2int * height, char * cout)

Decode PNG.

Parameters

pngbuf Pointer to PNG buffer.
width Pointer to width.
height Pointer to height.
cout Output buffer.

Returns

0 for success, error code otherwise.

Author

Stephen Gilbert

Definition at line 67 of file dec_png.c.

References user_read_data().

Referenced by pngunpack().

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 GRIB2 Data Representation Template 5.41 or 5.40010.

Parameters

cpack The packed data field (character*1 array).
len length of packed field cpack().
idrstmpl Pointer to array of values for Data Representation Template 5.41 or 5.40010.
ndpts The number of data values to unpack.
fld Contains the unpacked data values.

Returns

0 for success, 1 for memory allocation error.

Author

Stephen Gilbert

Date

2003-08-27

Definition at line 27 of file pngunpack.c.

References dec_png(), gbits(), int_power(), and rdieee().

Referenced by g2_unpack7().

Author

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.

Tue May 3 2022 Version 1.6.4