Reference saveGif()

saveGif()

Generates a gif from a sketch and saves it to a file.

saveGif() may be called in setup() or at any point while a sketch is running.

The first parameter, fileName, sets the gif's file name.

The second parameter, duration, sets the gif's duration in seconds.

The third parameter, options, is optional. If an object is passed, saveGif() will use its properties to customize the gif. saveGif() recognizes the properties delay, units, silent, notificationDuration, and notificationID.

Examples

Syntax

saveGif(filename, duration, [options])

Parameters

filename
String: file name of gif.
duration
Number: duration in seconds to capture from the sketch.
options
Object: an object that can contain five more properties:
Notice any errors or typos? Please let us know. Please feel free to edit src/image/loading_displaying.js and open a pull request!

Related References