71 fprintf(stderr,
" Compiled with libpng %s; using libpng %s.\n",
73 fprintf(stderr,
" Compiled with zlib %s; using zlib %s.\n",
93 writepng_error_handler,
NULL);
109 if (setjmp(mainprog_ptr->
jmpbuf)) {
140 if (mainprog_ptr->
pnmtype == 5)
142 else if (mainprog_ptr->
pnmtype == 6)
144 else if (mainprog_ptr->
pnmtype == 8)
158 if (mainprog_ptr->
gamma > 0.0)
242 mainprog_ptr->
png_ptr = png_ptr;
266 if (setjmp(mainprog_ptr->
jmpbuf)) {
304 if (setjmp(mainprog_ptr->
jmpbuf)) {
334 if (setjmp(mainprog_ptr->
jmpbuf)) {
380 fprintf(stderr,
"writepng libpng error: %s\n", msg);
384 if (mainprog_ptr ==
NULL) {
386 "writepng severe error: jmpbuf not recoverable; terminating.\n");
391 longjmp(mainprog_ptr->
jmpbuf, 1);
void PNGAPI png_set_packing(png_structp png_ptr)
PNG_CONST char png_libpng_ver[18]
void PNGAPI png_set_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
void PNGAPI png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
void PNGAPI png_write_image(png_structp png_ptr, png_bytepp image)
png_infop PNGAPI png_create_info_struct(png_structp png_ptr)
void PNGAPI png_set_compression_level(png_structp png_ptr, int level)
#define PNG_INTERLACE_NONE
#define PNG_COLOR_TYPE_RGB
int writepng_encode_image(mainprog_info *mainprog_ptr)
png_voidp PNGAPI png_get_error_ptr(png_structp png_ptr)
png_infop png_color_16p * background
#define PNG_INTERLACE_ADAM7
#define PNG_LIBPNG_VER_STRING
void PNGAPI png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
#define PNG_COLOR_TYPE_RGB_ALPHA
PNG_CONST char FAR * png_const_charp
#define Z_BEST_COMPRESSION
void PNGAPI png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
void writepng_cleanup(mainprog_info *mainprog_ptr)
#define PNG_TEXT_COMPRESSION_NONE
png_struct FAR * png_structp
void PNGAPI png_write_info(png_structp png_ptr, png_infop info_ptr)
#define PNG_FILTER_TYPE_DEFAULT
#define PNG_COLOR_TYPE_GRAY
void writepng_version_info(void)
void PNGAPI png_write_end(png_structp png_ptr, png_infop info_ptr)
int writepng_encode_finish(mainprog_info *mainprog_ptr)
png_infop png_textp int * num_text
int writepng_encode_row(mainprog_info *mainprog_ptr)
void PNGAPI png_convert_from_time_t(png_timep ptime, time_t ttime)
#define PNG_COMPRESSION_TYPE_DEFAULT
void PNGAPI png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
void PNGAPI png_write_row(png_structp png_ptr, png_bytep row)
png_structp PNGAPI png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
void PNGAPI png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)
int writepng_init(mainprog_info *mainprog_ptr)
void PNGAPI png_init_io(png_structp png_ptr, png_FILE_p fp)