self.pic='http://www.baidu.com/1.jpg' 网络图片地址 file='' if self.pic: file = cStringIO.StringIO(urllib2.urlopen(self.pic).read()) bmp = wx.BitmapFromImage(wx.ImageFromStream(file)) w=bmp.GetWidth() h=bmp.GetHeight() bmp=bmp.ConvertToImage().Scale(w/2,h/2) bmp=bmp.ConvertToBitmap() self.img_pic1 = wx.BitmapButton(self.imgpanel, -1
wxpython 加载网络图片并缩放
最新推荐文章于 2024-06-13 10:24:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)