Large Slideshow in Processing
in
Programming Questions
•
1 year ago
EDITED 10-4-2012 FOR CLARITY
__________
I am new to processing, and I have been given a large task of creating a slideshow for my research intern professor.
There are about 1600 images, each sized at 1400x900.
The images 'arrays' need to be grouped in sets of 8 images each.
The naming convention is letter (A-J), number(1-6), underscore, number(1-8). example:
A1_1, A1_2, A1_3, A1_4, A1_5, A1_6, A1_7, A1_8 [this equals one set]
A2_1, A2_2, A2_3,....
How do I cycle through image array sets, in the way such as:
images named A1_(1-8) display
images named A2_(1-8) display
images named A3_(1-8) display
etc...
Where each set plays after the last set has finished?
If possible, I need a way to do this without renaming the image files. The scale of that job would take far too long.
Any help would be greatly appreciated! please and thank you!
I have only figured out how to loop one set at a time using the following code, which was derived directly from the Reas/Fry book:
int numFrames = 8;
PImage[] images = new PImage[numFrames];
float x=0;
void setup() {
size(1400, 900);
frameRate(4);
for (int i = 0; i <= images.length; i++) {
String imageName = "A" + "1_" + (i+1) + ".jpg";
images[i] = loadImage(imageName);}
}
void draw() {
int frame = frameCount % 8;
image(images[frame], 0, 0);
}
________________________
Please help me, I'm hopeless...
1