pixelated image

pix image

 

int x;
int y;
PImage img;
color pix;

void setup () {
size (596, 550);
img= loadImage (“http://nadav.harel.org.il/Bridget_Riley/Loss.gif”);
}

void draw () {
//image (img, 0,0);

for (x = 0; x< img.width; x+=6) {
for (y= 0; y< img.height; y+=6) {

pix= img.get(x, y); // colors of image
fill(pix);
rect( x, y, 10, 10);
}
}
}

Leave a Reply

Your email address will not be published.