We are about to switch to a new forum software. Until then we have removed the registration on this forum.
the exported gif always running at 10 fps. how to make higher fps;
gifAnimation 3.0.0 _ processing 3.3.4
import gifAnimation.*;
GifMaker gifExport;
float x;
void setup() {
size(200, 200);
gifExport = new GifMaker(this, "export.gif");
gifExport.setRepeat(0);
//setDelay() can make gif slower ,but can't make gif run faster ,
gifExport.setDelay(0);
}
void draw() {
x=x+3;
fill(250);
ellipse(x,10,30,30);
gifExport.addFrame();
}
void keyPressed() {
gifExport.finish();
}
Answers
See void setDelay(int ms) here: http://extrapixel.github.io/gif-animation/
Sets the delay (the "framerate") for the most recently added frame. This is measured in Milliseconds. This can be different for every frame. Note, this effects the playback speed of the resulting GIF-file only. So, the speed / framerate with which you wrote the frames has no effect on play- back speed.
Thank you ,But how to control the framerate of exported GIF, I've already set 0 delay ,But it still has 100ms delay ,During GIF playback.
Interesting -- that contradicts the documentation here:
https://github.com/01010101/GifAnimation#void-setdelayint-ms
Have you tried low non-zero numbers? If they don't work, it might be worth filing an issue on github.
https://github.com/extrapixel/gif-animation/blob/3.0/gifAnimation/src/GifEncoder.java#L208
You'll want to use the following in setup() where you replace 60 with your frame rate:
gifExport.setDelay(1000/60);