With wxUSE_PALETTE set to 0 and the user forcing to want a wxPNG_TYPE_PALETTE format the image would (partially) be marked as PNG_COLOR_TYPE_GRAY or PNG_COLOR_TYPE_GRAY_ALPHA instead and also saving would fail later on. Instead detect this specific case and save in the wxPNG_TYPE_COLOUR format.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66590
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
#else
bool bUsePalette = false;
+
+ if (iColorType == wxPNG_TYPE_PALETTE)
+ {
+ iColorType = wxPNG_TYPE_COLOUR;
+ }
#endif // wxUSE_PALETTE
bool bUseAlpha = !bUsePalette && (bHasAlpha || bHasMask);