Advertisement
freakrho

wxPython - Load base64 image

Dec 26th, 2014
8,661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. import wx, base64, cStringIO
  2.  
  3. def loadResource(aResource):
  4.     data = base64.b64decode(aResource)
  5.     stream = cStringIO.StringIO(data)
  6.     return wx.BitmapFromImage(wx.ImageFromStream(stream))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement