Simply save to Desktop
in
Programming Questions
•
2 years ago
I am using this little sketch to resave the same image 1000 times.
What I am trying to figure out now is how to save the jpgs to Desktop instead of the sketch folder (so that the icons fill the screen).
- int openFile = 1; //name the source image as 1.jpg
- int saveFile = 2;
- int x, y=0;
- PImage img;
- void setup(){
- size(386, 600);//image size
- }
- void draw(){
- img = loadImage(openFile+".jpg");
- image(img, x, y, img.width, img.height);
- img.save(saveFile+".jpg");
- openFile = saveFile;
- saveFile = saveFile+1;
- print("opening"+openFile);
- print(" saving:");
- println(saveFile+"...done!");
- if (saveFile>10000){
- exit();
- }
- }
1