We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › # .pixels cannot be resolved or is not a field
Page Index Toggle Pages: 1
# .pixels cannot be resolved or is not a field (Read 2066 times)
# .pixels cannot be resolved or is not a field
May 13th, 2009, 8:30am
 
hi,

I got the error:
# .pixels cannot be resolved or is not a field

it's on this line:
 println(ColorArray.pixels[20]);

the ColorArray.length is 76800 so that's correct

if you need more code tell me.

Code:
//draw points on coördinates

void drawPoint(int[] ColorArray){
println(ColorArray.length);
println(ColorArray.pixels[20]);
// for (int i=0; i<ColorArray.length; i++){

//noStroke();
// fill(color(ColorArray.pixels[i]));
//stroke(color(cam.pixels[i]));
//point(red(cam.pixels[i]), green(cam.pixels[i]), blue(cam.pixels[i]));
//rect((red(cam.pixels[i]), green(cam.pixels[i]), blue(cam.pixels[i]));
// pushMatrix();
// translate(red(ColorArray.pixels[i]), green(ColorArray.pixels[i]), blue(ColorArray.pixels[i]));
// rect(0, 0, 10, 10);
// popMatrix();

//}
}
Re: # .pixels cannot be resolved or is not a field
Reply #1 - May 13th, 2009, 8:37am
 
Use ColorArray[20].

ColorArray is an int[], rather than a PImage.
Re: # .pixels cannot be resolved or is not a field
Reply #2 - May 13th, 2009, 11:56am
 
yeah that works thx Smiley
Page Index Toggle Pages: 1