resize 1 whole array with images.

edited October 2013 in Questions about Code

resize 1 whole array with images.

PImage[] foto; 
    int[][] myArray;

PImage[] plaatjes(PImage[] a) {
  PImage[]hulp = new PImage[a.length];

  for (int i =0; i< hulp.length; i++) {
    hulp[i] = loadImage(i +".png");
    hulp[i] = (i +".png").resize(width /70, height/70); <--------- how you do this?

  }
  return hulp;
}

Answers

  • edited October 2013

    Maybe this?

    hulp[i].resize(width/70, height/70);
    

    In the previous line you have specified that hulp[i] is an image, so you can do to hulp[i] anything that you would do to an image, including .resize().

    I hope it helps!

Sign In or Register to comment.