I’ve got a wxPython app that uses the following line before creating a wx.BitmapButton:
imagePlus = wx.Image('wxPlus.png', wx.BITMAP_TYPE_PNG).ConvertToBitmap()
Is there a way to include the image’s data in the image, and so something more like this?
plusData = '...√#,›o~ño\Ķ˚fly™Ω.…Õo)Ú∞L∂W_≤Ï~˛⁄...'
imagePlus = wx.Image(plusData, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
By using the module StringIO you can create a ‘file-like object’ that you can pass to wx.ImageFromStream.