We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In draw loop
location,rr,cc all int
rd,grn,blu all float
get null pointer error on first line that tries to set rd to red pixel value.
location=rr*width+cc;
println(rr,cc,location);
rd=red(pixels[location]);
grn=green(pixels[location]);
blu=blue(pixels[location]);
println("RED="+rd,"GREEN+"+grn,"BLUE+"+blu);
Answers
println gives good numbers for rr,cc and location above rd=red(pixels[location]);
did you load the image and use
loadPixels();
https://processing.org/reference/loadPixels_.html
when you have no image
just use
loadPixels();
;-)