[wxPython-users] Bug in Bitmap / PNG Transparency?

Robin Dunn robin at alldunn.com
Fri Jun 15 23:10:14 PDT 2007


Marcus wrote:
> Hi,
> 
> When trying to display a PNG via wx.Image and wx.BitmapFromImage, it
> appears as though the alpha channel isn't rendered properly. I have
> attached a sample image and test-case, which is a white-to-transparent
> gradient on top, and a solid white color on the bottom. That image
> /should/ render as solid white when the background is white, however it
> instead renders a greyish-gradient. Is this a bug in wxPython, or
> wxWidgets, or am I doing something wrong?
> 
> Attached are white_gradient.png (the 32-bit gradient/white PNG), test.py
> (an example), and result_output.png (a screenshot of the example as
> taken on WinXP).

Have you tried drawing the image yourself instead of letting the static 
bitmap widget do it?

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list