Save output in processing every X seconds -


hi i'm using processing , want know if there way can automatically save output every x amount of seconds?

any great!

you looking saveframe() method. inside draw() method, can save screenshot of visual output.

void draw() {   // code    ...   // saves each frame screenshot-000001.png, screenshot-000002.png, etc.   saveframe("screenshot-######.png"); } 

more info: https://processing.org/reference/saveframe_.html

and take screenshot every x seconds:

int lasttime = 0;  void draw(){   // code   ...   // 1000 in milisecs, that's 1 sec   if( millis() - lasttime >= 1000){     saveframe("screenshot-######.png");     lasttime = millis();   } } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -