// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-static void LINKAGEMODE _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length )
+static void PNGLINKAGEMODE _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length )
-static void LINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data, png_size_t length )
+static void PNGLINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data, png_size_t length )
bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) )
{
// VZ: as this function uses setjmp() the only fool proof error handling
bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) )
{
// VZ: as this function uses setjmp() the only fool proof error handling
png_set_expand( png_ptr );
png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER );
png_set_expand( png_ptr );
png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER );
png_destroy_read_struct( &png_ptr, &info_ptr, (png_infopp) NULL );
unsigned char *ptr = image->GetData();
if ((color_type == PNG_COLOR_TYPE_GRAY) ||
png_destroy_read_struct( &png_ptr, &info_ptr, (png_infopp) NULL );
unsigned char *ptr = image->GetData();
if ((color_type == PNG_COLOR_TYPE_GRAY) ||
stream.SeekI(-4, wxFromCurrent);
return (hdr[0] == 0x89 && hdr[1] == 'P' && hdr[2] == 'N' && hdr[3] == 'G');
}
stream.SeekI(-4, wxFromCurrent);
return (hdr[0] == 0x89 && hdr[1] == 'P' && hdr[2] == 'N' && hdr[3] == 'G');
}