PImage img; void setup() { size(296,400); smooth(); background(0); rectMode(CENTER); img = loadImage("people-2.jpg"); } void draw() { background(0); // get the tile size float s = map(mouseX,0,width,2,12); // draw a rect mosaic noStroke(); for (float y = s/2; y < img.height; y += s+1) { for (float x = s/2; x < img.width; x += s+1) { fill(img.get(int(x),int(y))); rect(x,y,s,s); } } } // START NO NOTES // code used to capture screenshots void keyReleased() { if(key == '`' && !online) save("sketch.png"); }