We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Why does this give me garbage numbers for values of pixels?
PImage img;
void setup()
{
size(1000, 600);
img = loadImage("c:/acquire/test1.png");
img.loadPixels();
print(img.height,img.width,"\n");
print(img.pixels[42100]);
print(img.get(100,100));
img.updatePixels();
}
void draw()
{
img.resize(400, 525);
image(img, 0, 0);
}
print at bottom is:
4200 3200 -394579 -460552 (should be gray value 0-255)
Answers
https://Processing.org/reference/color_datatype.html