(thanks to my friend aBe from FunProgramming for pointing this out to me)
The stuff applying to animated GIFs on Tumblr that I have written about herestill applies but there’s now a neat library that one can import into a Processing sketch in order to have it create an animated GIF (without having to save the individual GIFs and then convert them manually): gifAnimation.
Personally I use it like this:
- before setup()
import gifAnimation.*; GifMaker gifExport;
- in setup()
gifExport = new GifMaker(this, “export.gif”); gifExport.setRepeat(0); // = loop forever
- in draw()(in order to have a GIF with 60 frames)
if (frameCount%2==0 && frameCount<121) { gifExport.setDelay(5); // = speed of the animated GIF gifExport.addFrame(); } if (frameCount>121) gifExport.finish();
When I have in my sketch the following:
import gifAnimation.*;
get ERROR:
The package "gifAnimation" does not exist. You might be missing a library.