HI! I’m a beginner in processing and I’m trying to do a sketch with an image with a noise filter using pixel, but I don’t know exactly what to do.
this is my code right now, but I want the image to have the original color and the noise but with the image still visible.
PImage ed;
float g,b,r;
void setup(){
size(600,600);
ed = loadImage("ed.jpg");
ed.resize(width,height);
}
void draw(){
image(ed,0,0);
loadPixels();
for(int x=0;x<width;x++){
for(int y=0;y<height;y++){
int loc = x+y*width;
r=random(255);
g = green(ed.pixels[loc]);
b=random(255);
pixels[loc]=color(g,b,r);
}
}
updatePixels();
}
thanks!