如何将PIL image转成wx.Image与wx.Bitmap
代码如下:
from PIL import Imageimport wxpilImage = Image.open('my.png')image = wx.EmptyImage(pilImage.size[0],pilImage.size[1])image=image.ConvertToImage()image.setData(pil.convert("RGB").tostring())image.setAlphaData(pil.convert("RGBA").tostring()[3::4]## use the wx.Image or convert it to wx.Bitmapbitmap = wx.BitmapFromImage(image)?