pngunpack.c(3)

πŸ“¦
version 2.3.0 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸŽ€ pngunpack.c πŸŽ€ β€” straight outta the Library Functions Manual, bestie πŸ’–

okay so like, hi. this is the manual page for pngunpack.c(3) and honestly? it's giving "quietly doing the most important job in the room" and we're obsessed. let's get into it πŸ’…


🌸 NAME 🌸

pngunpack.c β€” unpack data packed with PNG compression. that's it. that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, you gotta pull in the headers, no cap:

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

πŸ’œ Functions πŸ’œ

  • int g2c_pngunpackd (unsigned char *cpack, size_t len, int *idrstmpl, size_t ndpts, double *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. πŸ’–
  • int g2c_pngunpackf (unsigned char *cpack, size_t len, int *idrstmpl, size_t ndpts, float *fld) β€” same energy, same job: 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. ✨
  • g2int pngunpack (unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, float *fld) β€” yep, you guessed it, 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. 🫢
  • static int pngunpack_int (unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, void *fld, int fld_is_double, int verbose) β€” unpack a data field that was packed into a PNG image format using info from the GRIB2 Data Representation Template 5.41 or 5.40010. (yes she's static, she's the backstage icon, we'll get to her πŸ‘‘)

🌈 Detailed Description 🌈

Unpack data packed with PNG compression. literally the entire personality. πŸ¦‹

Author Stephen Gilbert

Date 2003-08-27

Definition in file pngunpack.c.


πŸ‘‘ Function Documentation πŸ‘‘

🧚 int g2c_pngunpackd (unsigned char * cpack, size_t len, int * idrstmpl, size_t ndpts, double * 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. she's the double girlie and she knows it πŸ’…

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

  • G2C_NOERROR β€” No Error. πŸŽ‰
  • G2C_ENOMEM β€” Out of memory. 😭

Author Ed Hartnett

Date Aug 8, 2022

Definition at line 188 of file pngunpack.c.

References G2C_PNG_DRS_TEMPLATE_LEN, and pngunpack_int().


πŸ“ int g2c_pngunpackf (unsigned char * cpack, size_t len, int * idrstmpl, size_t ndpts, float * 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. this one's the float sister, same job, different precision, still slaying ✨

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

  • G2C_NOERROR β€” No Error. πŸŽ‰
  • G2C_ENOMEM β€” Out of memory. 😭

Author Ed Hartnett

Date Sep 8, 2022

Definition at line 156 of file pngunpack.c.

References G2C_PNG_DRS_TEMPLATE_LEN, and pngunpack_int().


πŸ¦„ g2int pngunpack (unsigned char * cpack, g2int len, g2int * idrstmpl, g2int ndpts, float * 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. the OG, the main character, the one who's been here since 2003 πŸ’–

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

  • G2C_NOERROR β€” No error. (lowercase e, we respect her choices πŸ’…)
  • G2_JPCUNPACK_MEM β€” Out of memory. 😭

Author Stephen Gilbert

Date 2003-08-27

Author Ed Hartnett

Definition at line 126 of file pngunpack.c.

References G2_JPCUNPACK_MEM, G2C_ENOMEM, and pngunpack_int().

Referenced by g2c_unpack7_int().


🧁 int pngunpack_int (unsigned char * cpack, g2int len, g2int * idrstmpl, g2int ndpts, void * fld, int fld_is_double, int verbose) [static]

Unpack a data field that was packed into a PNG image format using info from the GRIB2 Data Representation Template 5.41 or 5.40010. she's the one everybody else calls behind the scenes. not me saying she's the backbone of this whole file 😭

Parameters

  • cpack β€” the packed data field (character*1 array).
  • len β€” the 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 β€” pointer that will get the unpacked data values.
  • fld_is_double β€” if non-zero, then fld will get data as double, otherwise float.
  • 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

  • G2C_NOERROR β€” No Error. πŸŽ‰
  • G2C_ENOMEM β€” Out of memory. 😭

Author Stephen Gilbert, Ed Hartnett

Date Aug 8, 2022

Definition at line 40 of file pngunpack.c.

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

Referenced by g2c_pngunpackd(), g2c_pngunpackf(), and pngunpack().


πŸ’Œ Author πŸ’Œ

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code. (not a human author, just a robot doing its lil thing πŸ€–βœ¨)


and that's the whole page bestie, we ate and left no crumbs πŸ½οΈπŸ’…

this lil doc lives in NCEPLIBS-g2c, Version 2.3.0, and it's filed under pngunpack.c(3) β€” go forth and unpack those PNG-packed fields, you've got this πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from