Export from Processing

void keyPressed() {
  if (key == 's') {
    save("test.jpg");
  }
}