I have a wxPython program which displays a large wx.Image
and updates it rapidly.
I’ve been using a wx.StaticBitmap
for this, but the refresh speed is terrible and there’s a lot of flickering.
From what I can tell by Googling, wx.StaticBitmap
is known to be bad for this scenario. In particular, wx.StaticBitmap
doesn’t blit and doesn’t double-buffer?
There is lots of advice on the internet about this, and most of it amounts to “roll your own,” using a variety of techniques. I can’t tell which technique is best.
I can make some accommodations for a technique which will get me faster speed. Like, I can use a wx.Bitmap
for the input instead of wx.Image
. Or I can draw directly to a DC, as long as that DC allows me to use wx.GraphicsContext
with alpha blending.
I do need the features of wx.StaticBitmap
, in particular I need to change the image size sometimes. My wx.StaticBitmap
is inside of a wx.ScrolledPanel
so the wx.ScrolledPanel
needs to know the size of the image.
What is the state of the art for a fast wx.StaticBitmap
?