Why does pixels array have too many pixels?
in
Core Library Questions
•
2 years ago
Hiya, I'm sure there's a simple answer to this!
I am creating a processing sketch of dimensions 40 x 25 pixels but when I try and loop through the pixels array it has 3200 pixels instead of 1000.
Can anyone tell me why?
Thankyou!
public void setup() {
size(40, 25);
frameRate(12);
}
public void draw() {
loadPixels();
println(pixels.length); //prints 3200
}
1