Skip to content Skip to sidebar Skip to footer

Transparent Images In Wxpython {mask}

I'm tired of searching this on the net and i cant get it to work. I need to turn green pixels into transparent ones, no half transparency needed. Wondering how can effectively use

Solution 1:

You can check the wxpython docs and demo.
In the demo Mask they show a method to use a transparent mask:

    # Now we'll create a mask in a bit of an easier way, by picking a
    # colour in the image that is to be the transparent colour.
    self.bmp_withcolourmask  = images.TestStar2.GetBitmap()
    mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
    self.bmp_withcolourmask.SetMask(mask)

Post a Comment for "Transparent Images In Wxpython {mask}"