def GetWXBitmap(myImage):
image = apply(wx.EmptyImage, myImage.size)
image.SetData(myImage.convert("RGB").tostring())
# if the image has an alpha channel,
# you can set it with this line:
myImage = myImage.convert("RGBA")
image.SetAlphaData(myImage.tostring()[3::4] )
return image.ConvertToBitmap()
FROM:
http://wiki.wxpython.org/WorkingWithImages#head-7aa43a4a1e066fd28640ce86066ba0617afe2a8b
Using wx.StaticBitmap (widget on the window to show the bitmap):
http://wiki.wxpython.org/wxStaticBitmap?highlight=%28Bitmap%29