Martin McBride, 2020-10-01
Categories generativepy generative art
The gif module is used to create animated GIFs from frame sequences.
The module use the open source program gifsicle to create optimised GIFs. You will need to install gifsicle on your system.
Used to create a single PNG image.
generativepy.gif.save_animated_gif(filepath, frames, delay, loop=0)
|filepath||String||The path and filename for the output GIF file. It should end in '.gif'.|
|frames||Sequence||A sequence of frames.|
|delay||number||The delay between frames, in seconds.|
|loop||int||Not currently implemented.|
save_animated_gif creates an animated GIF from a sequence of frames.
frames is a sequence of frames, such as the output from the movie.make_frames() function.
delay is the required delay between frames, in seconds. It is the inverse of the GIF framerate. For example, a value of 0.2 will give 5 frames per second.