ok, i've had some funny results when trying to make video renders of my GIF compositions....
since saveFrame() is pretty slow, i use Gif.pause(), then saveFrame(), then Gif.loop() again to make sure i get every frame of the animations down to disk. this works. but some of the frame delay of the gif animations gets eaten while saving, resulting in wrong (too fast) timing of the animations when i put the saved frames together to a movie.
im not a great programmer but i poked around the source code (Gif.java), and i think i have located the issue:
Code:private int[] delays;
contains the timing of each frame in the gif animation, and
Code:private int lastJumpTime;
contains the last time a frame was progessed in the animation.
the pause command
Code: public void pause() {
// System.out.println("pause");
play = false;
}
does not store the time it is paused, and the check
Code:if (parent.millis() - lastJumpTime >= delays[currentFrame]) {
whether we need to jump to next frame does not take any time paused in to consideration.....
would it be possible to update the library to take pause timing into consideration?
or maybe make these variables public, so i could read them and update them myself in connection with every saveFrame() / pause?
best,
jacob