Always save PNG as a true colour image instead of possibly a palettised image when...
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 5 Jan 2011 11:39:44 +0000 (11:39 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 5 Jan 2011 11:39:44 +0000 (11:39 +0000)
commit13c5d825d390faf0f8806c5e24e05461add6fa4e
tree08494d7614e6ab814806109db9a03134ab9ed3e5
parent5d875c119e5ed35293fcb009bc115e1fcf10e540
Always save PNG as a true colour image instead of possibly a palettised image when wxUSE_PALETTE is set to 0.

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
src/common/imagpng.cpp