void PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message) { wxPNGInfoStruct *info = png_ptr ? WX_PNG_INFO(png_ptr) : NULL; if ( !info || info->verbose ) wxLogWarning( wxString::FromAscii(message) ); }
// from pngerror.c // so that the libpng doesn't send anything on stderr static void PNGLINKAGEMODE wx_PNG_error(png_structp png_ptr, png_const_charp message) { wx_PNG_warning(NULL, message); // we're not using libpng built-in jump buffer (see comment before // wxPNGInfoStruct above) so we have to return ourselves, otherwise libpng // would just abort longjmp(WX_PNG_INFO(png_ptr)->jmpbuf, 1); }
static void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data, png_size_t length ) { WX_PNG_INFO(png_ptr)->stream.out->Write(data, length); }
static void PNGLINKAGEMODE wx_PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length ) { WX_PNG_INFO(png_ptr)->stream.in->Read(data, length); }