Waitsnake / AnimatedGif

A screensaver for Mac OSX / macOS that plays animated GIFs and APNGs
MIT License
213 stars 31 forks source link

Support of different frame delay times in GIFs #50

Closed Waitsnake closed 5 years ago

Waitsnake commented 5 years ago

Even if this feature(different frame delay times in GIFs) is not used very often in most GIF files a GIF can contain different delay times between frames resulting in variable fps values during running.

For the sake of easier implementation and because the method animateOneFrame from the class ScreenSaverView did not support a changing of timerAnimateOneFrame between startAnimation and stopAnimation AnimatedGif until now did not support this feature. It uses an fixed delay time(means a fixed fps) from the first frame of the GIF for the complete animation time.

To support this feature AnimatedGif needs to trigger the needed animation steps within its own controlled timer method.