def PILTowx(pimg):
 from wx_loader import wx
 wimg = wx.EmptyImage(pimg.size[0], pimg.size[1])
 wimg.SetData(pimg.convert('RGB').tostring())
 return wimg

def PILTowx ( pimg ) : from wx_loader import wx wimg = wx . EmptyImage ( pimg . size [ 0 ] , pimg . size [ 1 ] ) wimg . SetData ( pimg . convert ( 'RGB' ) . tostring ( ) ) return wimg
convert a pil image to a wx image .