Creating an empty (as in transparent) bitmap.

Ragnar Ouchterlony wrote:

Robin Dunn wrote:

You also need to set the mask of the resulting bitmap. One way to do
that is to fill the bitmap with a certain colour before you start
drawing the stars on it, and then set a mask using that colour after you
are done. For example:

...
image.SetBackground(wxBrush("MAGENTA"))
image.Clear()
...

bmp.SetMaskColour("MAGENTA")

Yes, I could do that, but doesn't that mean that I'll lose the
alpha-channel and only have completely transparent or completely solid
pixels? Or isn't it possible to keep the complete alpha-channel from the
png?

wxWindows 2.4 doesn't support alpha, (but it will in 2.5) so your alpha channel is probably already being converted to a mask.

ยทยทยท

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