I don't want to look insisting,
If I run it without the for loop then all values are printed 0
If I run with the for loop then the output is correct:
[11013] -3309016
[11014] -3572181
[11015] -3637975
[11016] -3638234
[11017] -3637968
[11018] -3638479
[11019] -3639510
[11020] -3705300
only the array names are still not how I want them.
It end with 11020, which is the total ammount of pixels.
The image I use now is 107x103 and I want to be able to see the positions back. What is smartest to do, a bi-dimentional array like this:
[arraynumber] { {xpos, ypos, colorvalue} }
The last pixel at right bottem wil be for example:
imageColors[11020]   107, 103, -3705300
try with and without for loop if you like 
Code:PImage img;
color[] imageColors;
void setup(){
  size(50, 100);
  img = loadImage("plaatje.png");
  noLoop();
  imageColors = new color[img.width*img.height];
  /*for (int y = 0; y < img.height; y++) {
    for (int x = 0; x < img.width; x++){
	imageColors[y * img.width + x] = img.get(x, y);
    }
  }*/
  println(imageColors);
}