NCEPLIBS-g2  3.4.5
dec_png.c File Reference

This program reads PNG stream data from memory. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <png.h>

Go to the source code of this file.

Typedefs

typedef long g2int
 Long Integer type. More...
 
typedef struct png_stream png_stream
 location to write PNG stream More...
 

Functions

int SUB_NAME (unsigned char *pngbuf, g2int *width, g2int *height, char *cout)
 create png_structs to write png stream into memory. More...
 
void user_read_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
 Custom read function used so that libpng will read a PNG stream from memory instead of a file on disk. More...
 

Detailed Description

This program reads PNG stream data from memory.

Author
Stephen Gilbert

Definition in file dec_png.c.

Typedef Documentation

◆ g2int

typedef long g2int

Long Integer type.

Definition at line 15 of file dec_png.c.

◆ png_stream

typedef struct png_stream png_stream

location to write PNG stream

Definition at line 39 of file dec_png.c.

Function Documentation

◆ SUB_NAME()

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

create png_structs to write png stream into memory.

Parameters
pngbufPNG buffer.
widthwidth.
heightheight.
coutnumber of bits.
Returns
0
Author
Stephen Gilbert

Definition at line 76 of file dec_png.c.

◆ user_read_data()

void user_read_data ( png_structp  png_ptr,
png_bytep  data,
png_uint_32  length 
)

Custom read function used so that libpng will read a PNG stream from memory instead of a file on disk.

Definition at line 43 of file dec_png.c.