• You can write to console area of the Processing environment using print() and println().
  • Useful for debugging and testing.
  • save() Saves an image from the display window
  • background(55,0,0)
    line(20, 20, 80, 80);
    save("diagonal.tif");
    line(80, 20, 20, 80);
    save("cross.jpg");
    
  • To see the written images select "Show sketch folder" from the "Sketch" menu.
  • Supports TIFF, TARGA, JPEG, and PNG format.
  • Use saveFrame() to automatically saves frame as image when called. File names are numbered sequence.
  • int x = 0;
    void draw()
    {
      background(204);
      if(x < 10) {
        line(x, 0, x, 100);
        x = x + 1;
      } else {
        noLoop();
      }
      // Saves each frame as line-00.jpg, line-01.jpg, etc.
      saveFrame("line-##.jpg"); 
    }