Animated gif slow in Picturebox

T

timothy

I've been messing around with this small image viewer program, nothing
too complex, and I noticed that when displaying gifs in a picturebox,
it doesn't always playback at the same speed it should be. So I went
and created a 30fps time code gif, from an avi I google'd (sorry,
didnt keep link to webpage). Links to gif:

http://rapidshare.com/files/174984949/tc_30fps_ndf_01min.gif.html
-or-
http://www.megaupload.com/?d=SLPXKLG7

When played in a picturebox, you can see it doesnt playback fast
enough, and on some gifs will drop some frames entirely. I also tried
ImageAnimator directly and still wasn't fast enough. Plays fine in
firefox however.

Any idea on how to show a gif file at speed it should be played back,
without dropping frames?
 
K

kimiraikkonen

I've been messing around with this small image viewer program, nothing
too complex, and I noticed that when displaying gifs in a picturebox,
it doesn't always playback at the same speed it should be. So I went
and created a 30fps time code gif, from an avi I google'd (sorry,
didnt keep link to webpage). Links to gif:

http://rapidshare.com/files/174984949/tc_30fps_ndf_01min.gif.html
-or-http://www.megaupload.com/?d=SLPXKLG7

When played in a picturebox, you can see it doesnt playback fast
enough, and on some gifs will drop some frames entirely.  I also tried
ImageAnimator directly and still wasn't fast enough. Plays fine in
firefox however.

Any idea on how to show a gif file at speed it should be played back,
without dropping frames?

Granted, i've previously have tried some of GIFs in picturebox and
noticably slower than it should be.

As it can be considered a solution, you can try to place a webbrowser
on your form and navigate to that picture if your main purpose is to
display animated gif with its original speed ratio.

Webbrowser1.Navigate("c:\animaiton.gif")

....animation.gif should be displayed with its normal speed (and faster
than picturebox) in webbrowser.


Note that when you use webbrowser to display an animated gif, you will
also need to resize the control and put up with its white background.

Hope this helps,

Onur Güzel
(e-mail address removed)
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top