Parts and boxes and stuff

PImage img;
int boxsize = 3;

void setup() {

  img = loadImage("flower.jpg");

  size(img.width, img.height);

  noStroke();
}

void draw() {
  // for (int x=0; x< width; x += boxsize) {
  for (int y=0; y < height; y+=boxsize) {
    fill( img.get(width/2, y));
    rect(0, y, width, boxsize);
  }
  // }
}

void keyPressed() {

  saveFrame("output/image.jpg");
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*


− 5 = zero

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>