Load images with three digits filenames
in
Programming Questions
•
6 months ago
Hi,
I want to do a project using more than a hundred of images.
Since I am fairly new to Processing, I started with an array of 10 images. I manually named the files as test_0.jpg, test_1.jpg, test_2.jpg... before I loaded the images with a for loop. And it worked! :
for ( int i = 0; i< allImages.length; i++ ) {
allImages[i]=loadImage( "test_" + i + ".jpg" );
println(i);
}
Then I tried to load 100 images. Indeed, I used a software (Adobe Bridge) to name the files this time.
test_0.jpg therefore became test_000.jpg
test_1.jpg became test_001.jpg
...
I think Processing does not consider 0 and 000 as being equivalent. And I am unable to figure out why...
Should I add something in the parenthesis?
All ideas welcomed!
1