Hello everyone
I’m working on a simple Processing project in Python but I can’t find a way to export the animation to .gif. Is there a way to do it?
Thank you
You could save each frame and then use some other tool to convert them into 1 GIF:
Of course, of course. What I was interested in was being able to make a gif directly, just as you can in p5js.
Having to make a sequence of images and then convert it to a gif is more cumbersome
Function saveGif() is a exclusive p5*js API feature.
But if you’re on P3, there’s this library we can install from “Contribution Manager” called GifAnimation, which has a GifMaker class:
Once installed, I believe it can be imported on Python Mode like this:
add_library('gifAnimation')
from gifAnimation import GifMaker
Maybe the explicit from gifAnimation import GifMaker
isn’t needed, just add_library('gifAnimation')
would be enough.
You can also try out PyScript + p5*js if somehow GifAnimation doesn’t work for you:
I will investigate what you tell me. Thanks for the information!