save two parts and continously numbered pictures
in
Programming Questions
•
6 months ago
hi
i am trying to save a picture in two parts and continously numbered
the simple script which saves the whole picture ist below.
how can i split it in two separate and continously numbered pictures?
thanks for your help!
i am trying to save a picture in two parts and continously numbered
the simple script which saves the whole picture ist below.
how can i split it in two separate and continously numbered pictures?
thanks for your help!
- void setup(){
size (800,400);
}
void draw(){
if(mousePressed){
//right side
stroke(255,0,0);
strokeWeight(1);
//left side
line(mouseX, mouseY, pmouseX, pmouseY);
stroke(0);
line(mouseX-width/2, mouseY, pmouseX-width/2, pmouseY);
}
}
void keyPressed(){
if (key == 's') {
saveFrame("left-###.png");
saveFrame("right-###.png");
}
}
1