image array issue null pointer
in
Programming Questions
•
11 months ago
I really cant get my head round why this wont work - i am most assured that its an easy fix but i really cant see it
I want to load 20 images from the data folder in and display them slightly overlapping each other
breaking it down it seems to work and throw the null pointer when i try to display the images using the image(loadedImage) command
help much appreciated - im quite ashamed i cant figure this out after many years of processing.... #fail
- void loadPics() {
- PImage[] loadedImage = new PImage[20];
- for(int i=0; i<20; i++) {
- loadedImage[i]=loadImage(""+(i)+".png");
- }
- for(int i=0; i<20; i++) {
- image(loadedImage[i],0,i+100);
- }
- }//end void
1