Discard fully transparent alpha channel when loading bitmaps.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Apr 2010 13:15:25 +0000 (13:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Apr 2010 13:15:25 +0000 (13:15 +0000)
commitb5131230626e20bde4bf9936eb7e5cebc8f629dc
treeffd85a39a9a70f4b29a685f994031e834d9a402b
parent90fbb09ae248c93b0cf62eb7cf4ecfd94f88023f
Discard fully transparent alpha channel when loading bitmaps.

Some bitmap files declare themselves to be 32bpp, normally indicating that
they have an alpha channel, but have only zeroes in their alpha data. Hence
loading them used to create fully transparent images which wasn't the desired
effect.

Fix this by simply discarding the alpha channel entirely if it turns out that
all pixels were fully transparent.

Closes #10915.

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