png_create_write_struct

Name

png_create_write_struct -- allocate and initialize a png_struct structure for writing PNG file

Synopsis

#include <png.h>

png_structp png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);

Description

png_create_write_struct() shall allocate and initialize a png_struct structure. The function shall return NULL if the allocation fails. The application should check for the return value.

user_png_ver 

version string of the library. Must be PNG_LIBPNG_VER_STRING

error_ptr 

user defined struct for error functions.

error_fn 

user defined function for printing errors and aborting.

warn_fn 

user defined function for warnings.

Return Value

Returns the pointer to png_struct structure. Returns NULL if it fails to create the structure.