Search processing.org:

Reference for Processing version 1.0+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name | ### save()
Examples |
    line(20, 20, 80, 80);
    // Saves a TIFF file named "diagonal.tif"
    save("diagonal.tif");
    // Saves a TARGA file named "cross.tga"
    line(80, 20, 20, 80);
    save("cross.tga");
Description | Saves an image from the display window. Images are saved in TIFF, TARGA, JPEG, and PNG format depending on the extension within the filename parameter. For example, "image.tif" will have a TIFF image and "image.png" will save a PNG image. If no extension is included in the filename, the image will save in TIFF format and .tif will be added to the name. These files are saved to the sketch's folder, which may be opened by selecting "Show sketch folder" from the "Sketch" menu. It is not possible to use save() while running the program in a web browser. All images saved from the main drawing window will be opaque. To save images without a background, use createGraphics().
Syntax |
    save(filename)
Parameters |
filename | String: any sequence of letters and numbers
Returns | None
Usage | Application
Related | saveFrame() createGraphics()

Updated on November 22, 2008 08:39:26pm PST