]> git.saurik.com Git - wxWidgets.git/commit
Fixed saving PNG in wrong format sometimes.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Fri, 7 Jan 2011 08:48:43 +0000 (08:48 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Fri, 7 Jan 2011 08:48:43 +0000 (08:48 +0000)
commitb057ac075b504e160ac2571cd2c79171fc55f55d
tree048b8fc0296d8a589b8fac2b2719c95612e6af10
parent17811bf9c958eb4148f37ef3ca289dbc4cf6aed6
Fixed saving PNG in wrong format sometimes.

When explicitly requesting saving as a palettised image but then later on that turns out to not be possible (or desired) the image would be marked as PNG_COLOR_TYPE_GRAY or PNG_COLOR_TYPE_GRAY_ALPHA. Simply set the colour type to RGB if this occurs also updated the unit test to catch this case.

This is similar to the fix in r66590 but that one was related to wxUSE_PALETTE == 0 cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/imagpng.cpp
tests/image/image.cpp