// constants
// ----------------------------------------------------------------------------
-// image can not have any transparent pixels at all, have only 100% opaque
+// image cannot have any transparent pixels at all, have only 100% opaque
// and/or 100% transparent pixels in which case a simple mask is enough to
// store this information in wxImage or have a real alpha channel in which case
// we need to have it in wxImage as well
image->Create((int)width, (int)height, (bool) false /* no need to init pixels */);
- if (!image->Ok())
+ if (!image->IsOk())
goto error;
// initialize all line pointers to NULL to ensure that they can be safely
wxLogError(_("Couldn't load a PNG image - file is corrupted or not enough memory."));
}
- if ( image->Ok() )
+ if ( image->IsOk() )
{
image->Destroy();
}
#endif
;
- png_color_8 mask;
+ png_color_8 mask = { 0, 0, 0, 0, 0 };
if (bHasMask)
{
mask.red = image->GetMaskRed();
mask.green = image->GetMaskGreen();
mask.blue = image->GetMaskBlue();
- mask.alpha = 0;
- mask.gray = 0;
}
PaletteMap palette;