| | |
Animated Images
![]() |
You need to use the wxPython GUI toolkit to do that:
I think something like this is in the snippets.
python Syntax (Toggle Plain Text)
# experiment with the wx.animate.GIFAnimationCtrl() widget # needs wxPython installed import wx import wx.animate class AnimatedGif(wx.Panel): """class to show an animated gif image on a panel""" def __init__(self, parent, id): wx.Panel.__init__(self, parent, id) #self.SetBackgroundColour("black") # pick an animated GIF filename you have in the working folder ag_fname = "ag_puppy.gif" try: ag = wx.animate.GIFAnimationCtrl(self, id, ag_fname, pos=(10, 10)) parent.SetTitle(ag_fname) except: pass ag.GetPlayer().UseBackgroundColour(True) ag.Play() app = wx.PySimpleApp() frame = wx.Frame(None, id=-1, title="need animated gif file", size=(300, 300)) AnimatedGif(frame, id=-1) frame.Show(True) app.MainLoop()
drink her pretty
![]() |
Similar Threads
- animated pictures and .GIF files (Graphics and Multimedia)
- Images in signatures (Growing an Online Community)
- unable to properly save images (Windows NT / 2000 / XP)
- creating menu bars and animate images (JavaScript / DHTML / AJAX)
- animated gifs don't display (Web Browsers)
- images no longer animated (Web Browsers)
Other Threads in the Python Forum
- Previous Thread: soduko problem
- Next Thread: Numeric elements of a mixed list
| Thread Tools | Search this Thread |
accessdenied advanced apache application argv array beginner book change command converter countpasswordentry csv curved dan08 def dictionary dynamic edit enter event examples file float format function google gui homework import inches input jaunty java keyboard lapse library line lines linux list lists loop microphone mouse movingimageswithpygame mysqlquery newb number numbers numeric obexftp output parameters parsing path phonebook plugin port prime programming projects py2exe pygame pygtk pyopengl python random recursion redirect remote return reverse scrolledtext session simple skinning software sprite statictext string strings syntax terminal text threading time tlapse trick tuple tutorial ubuntu unicode unit urllib urllib2 variable voip wordgame wxpython






