How to display images smoothly?

kamil_holubicki@poczta.onet.pl wrote:

b) while sizing window (resize using mouse connected to border) image is blinking
   and ugly artefacts stay where bitmap was before resizing and is not after (looks like chopped image)

Take a look at the thread on this list from this week: "wxStaticBitmap as Delphi TImage?"

http://lists.wxwidgets.org/pipermail/wxpython-users/2008-June/076323.html

It covers this issue.

Animation works perfectly, but the image is blinking.
How to do such effect without blinking?

and it may cover that one too.

In short, you may need both:

self.Refresh()

self.Bind(wx.EVT_ERASE_BACKGROUND, lambda evt: None)

That catches the evnt that tells the Window to clear itself, and does nothign with it, so that it wont get cleared before drawing your new bitmap.

Also, I suspect that you may not want to use a wx.StaticBitmap, but rather draw the bitmap to a wx.Window yourself, like in the example from that thread.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov