Skip to content

Instantly share code, notes, and snippets.

@bmoren
Created January 5, 2015 16:11
Show Gist options
  • Save bmoren/8a59a2f241a307686ee1 to your computer and use it in GitHub Desktop.
Save bmoren/8a59a2f241a307686ee1 to your computer and use it in GitHub Desktop.
Image Layer #1
//path to image files (list) filenames as the following: 0001.jpg, 0002.jpg, 0003.jpg etc.
String PATH = "/Users/bmoren/Desktop/Aspens_test/JPG/";
int IMAGE_NB = 0001; // first in sequence
void setup()
{
//change to what you want your output to be
size(5184,3456);
background(255);
tint(255,10); // this setting will stick
}
void draw() {
image(loadImage(PATH + nf(IMAGE_NB++,4) + ".jpg"),0,0);
saveFrame("img_" + IMAGE_NB + ".jpg");
}
void keyPressed() {
// spacebar to save the current image
if(key == ' ') saveFrame("img_" + IMAGE_NB + ".jpg");
print("exported");
}
//Dont forget to increase your memory allotment in the preferences (use your MAX ram)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment