is double buffering the correct thing in this case?

I have a fullscreen window that loads a series of
bitmaps, like a slideshow. Each of the bmp's is also
fullscreen. In other words, there's always exactly one
picture shown, fullscreen.

I'm getting a lot of flickering when changing from one
to the next. I'm not doing any sort of buffering at
the moment, simply something like:

# define the main picture and load something
bmp = wx.Image("moon.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture = wx.StaticBitmap(panel, -1, bmp)

# load picture 1
bmp = wx.Image("sunset.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture.SetBitmap(bmp )

time.sleep(5)

# load picture 2
bmp = wx.Image("sunrise.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture.SetBitmap(bmp )

Etc.

Searching around I see some threads about double
buffering but can't tell if that's the correct way to
go in my case. Is it? Is that how you'd do it?

Thanks for any help.

···

____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

You don't need to double buffer here, just to disable background
erasing. call SetBackgroundStyle(wx.BG_STYLE_CUSTOM) on your control.

···

On Jan 14, 2008 2:17 AM, Alec Bennett <whatyoulookin@yahoo.com> wrote:

I have a fullscreen window that loads a series of
bitmaps, like a slideshow. Each of the bmp's is also
fullscreen. In other words, there's always exactly one
picture shown, fullscreen.

I'm getting a lot of flickering when changing from one
to the next. I'm not doing any sort of buffering at
the moment, simply something like:

# define the main picture and load something
bmp = wx.Image("moon.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture = wx.StaticBitmap(panel, -1, bmp)

# load picture 1
bmp = wx.Image("sunset.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture.SetBitmap(bmp )

time.sleep(5)

# load picture 2
bmp = wx.Image("sunrise.jpg",
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
mainPicture.SetBitmap(bmp )

Etc.

Searching around I see some threads about double
buffering but can't tell if that's the correct way to
go in my case. Is it? Is that how you'd do it?