Name | saveFrame() |
||||
---|---|---|---|---|---|
Examples | int x = 0; void draw() { background(204); if(x < 100) { line(x, 0, x, 100); x = x + 1; } else { noLoop(); } // Saves each frame as screen-0000.tif, screen-0001.tif, etc. saveFrame(); } int x = 0; void draw() { background(204); if(x < 100) { line(x, 0, x, 100); x = x + 1; } else { noLoop(); } // Saves each frame as line-0000.tif, line-0001.tif, etc. saveFrame("line-####.tif"); } |
||||
Description | Saves a numbered sequence of images, one image each time the function is run. To save an image that is identical to the display window, run the function at the end of draw() or within mouse and key events such as mousePressed() and keyPressed(). If saveFrame() is called without parameters, it will save the files as screen-0000.tif, screen-0001.tif, etc. It is possible to specify the name of the sequence with the filename parameter and make the choice of saving TIFF, TARGA, PNG, or JPEG files with the ext parameter. These image sequences can be loaded into programs such as Apple's QuickTime software and made into movies. These files are saved to the sketch's folder, which may be opened by selecting "Show sketch folder" from the "Sketch" menu. All images saved from the main drawing window will be opaque. To save images without a background, use createGraphics(). |
||||
Syntax | saveFrame() saveFrame(filename-####.ext) |
||||
Parameters |
|
||||
Returns | none | ||||
Usage | Application | ||||
Related | save() createGraphics() |