// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose)
+bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) )
{
// VZ: as this function uses setjmp() the only fool proof error handling
// method is to use goto (setjmp is not really C++ dtors friendly...)
{
// VZ: as this function uses setjmp() the only fool proof error handling
// method is to use goto (setjmp is not really C++ dtors friendly...)
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) ||
- if (!verbose) png_set_error_fn(png_ptr, (png_voidp)NULL, png_silent_error, png_silent_warning);
+ if (!verbose) png_set_error_fn(png_ptr, (png_voidp)NULL, png_silent_error, png_silent_warning);
data[(x << 2) + 0] = *ptr++;
data[(x << 2) + 1] = *ptr++;
data[(x << 2) + 2] = *ptr++;
data[(x << 2) + 0] = *ptr++;
data[(x << 2) + 1] = *ptr++;
data[(x << 2) + 2] = *ptr++;
(data[(x << 2) + 0] != image->GetMaskRed()) || \
(data[(x << 2) + 1] != image->GetMaskGreen()) || \
(data[(x << 2) + 2] != image->GetMaskBlue()))
(data[(x << 2) + 0] != image->GetMaskRed()) || \
(data[(x << 2) + 1] != image->GetMaskGreen()) || \
(data[(x << 2) + 2] != image->GetMaskBlue()))