Flash-Animated-GIF-Library icon indicating copy to clipboard operation
Flash-Animated-GIF-Library copied to clipboard

Dynamically Change Framerate of GIF?

Open Flashfyre opened this issue 11 years ago • 2 comments

I've been trying to create a working function that changes the framerate of an animated GIF after initialization since I need it for a project, but I can't seem to figure out anything that works. Is there a chance you could add or tell me how to add such a function? Thanks.

Edit: I figured out a way around the problem by making the step function public and using a timer, but if you still wanted to add this I'm sure there's some people who would appreciate it.

Flashfyre avatar Jul 04 '14 17:07 Flashfyre

Hm. Interesting. The thing is, GIF files don't have a framerate. Each frame has an independently specified delay value. So there is no concept of framerate for the animation as a whole. It's all about how long to display each individual frame.

theturtle32 avatar Mar 11 '15 02:03 theturtle32

What kind of API would you propose for this? I suppose if you just want to scale the playback rate by some percentage:

player.setSpeed(0.75); // play at 75% speed.

theturtle32 avatar Mar 11 '15 02:03 theturtle32