Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- int stepSize=10;
- void setup() {
- size(100, 100);
- img = loadImage("image1.jpg");
- surface.setResizable(true);
- surface.setSize(img.width, img.height);
- for (int x=0; x<width; x+=stepSize) {
- for (int y=0; y<height; y+=stepSize) {
- color c = img.get(x, y);
- fill(c);
- noStroke();
- ellipse(x, y, stepSize, stepSize);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement