PImage array problem
in
Programming Questions
•
2 years ago
Hi I'm trying to load all images of array in sequence but it only display the first few images repeated at beginning of the grid?
I went through all books...can't find a clear answer
Thanks for your help
- int box_size = 25;
- int margin = 7;
- PImage[] page];
- void setup(){
- size(600,500);
- background(255);
- }
- void draw(){
- // for(int i = 0; i < page.length;i++) {
- page= new PImage[12];
- for(int e = 0; e < page.length ;e ++) {
- page[e]=loadImage(e+ ".png");
- for (int i = 0; i < height-margin; i += box_size){
- {
- for(int j = 0; j < width-margin; j += box_size ){
- image(page[e],i, j,box_size, box_size);
- }
- box_size += box_size+margin ;
- }
- }
- }
- }
2