[wx-dev] #9741: wxIcon doesn't load transparent icons correctly
wxTrac
noreply at wxsite.net
Tue Jul 15 09:55:40 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9741>
#9741: wxIcon doesn't load transparent icons correctly
-------------------------------------------+--------------------------------
Reporter: kevinw | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: GUI-all | Version: 2.8-svn
Keywords: wxIcon, transparency, favicon | Blockedby:
Patch: 1 | Blocking:
-------------------------------------------+--------------------------------
The ICO format can specify 32 bits per pixel, but wxBMPHandler::DoLoadDib
ignores the 4th channel. Here's an example of an icon that fails:
http://www.google.com/favicon.ico
If you load this with wxIcon, convert to a wxBitmap, and show it on
screen, you'll see a black area at the bottom of the image where a
transparent grey should be.
The attached patch makes the DoLoadDib function call wxImage::SetAlpha if
bpp is 32, and causes the favicon to show correctly.
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9741>
More information about the wx-dev
mailing list