本文介绍了给 wx.StaticBitmap 一个透明的背景?蟒蛇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张背景为白色的图片,如何使背景不可见?它在 wx.StaticBitmap

I have an image that has a white background, how can I make this background invisible?Its in a wx.StaticBitmap

wx.StaticBitmap(self, bitmap=wx.Bitmap('images/myimage.png'),pos=(0,0))

推荐答案

所谓的不可见,我假设你的意思是透明的,这样图像后面的任何东西都能透过.

By invisible, I assume you mean transparent so that whatever is behind the image shines through.

这不是小部件的功能,而是您用来编辑图像的任何功能.你不说!

This is not a function of widgets, but whatever you use to edit your image. You don't say!

我使用微软视觉工作室.这是一个屏幕截图.请注意背景如何在编辑器中以某种蓝绿色显示 - 这将显示为透明,您可以在显示最终外观的列中看到这种情况.

I use microsoft visual studio. Here's a screenshot. Notice how the background, shown in a sort of blue-green in the editor - this will show up as transparent, which you can see happening in the column showing the fianl appearances.

这篇关于给 wx.StaticBitmap 一个透明的背景?蟒蛇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 20:13