有没有可能把它转换成位图或图标?例如,我希望避免将其保存在文件中,而使用wx.Bitmap读取它。
发布于 2011-05-29 23:50:14
这似乎起作用了:
import wx
import gtk
pb = gtk.gdk.pixbuf_new_from_file("someFile.jpg")
img = wx.EmptyImage(pb.get_width(), pb.get_height())
img.SetData(pb.get_pixels())
## you can now convert the wx.Image to wx.Bitmap etc...https://stackoverflow.com/questions/6168169
复制相似问题