Cours2 2.Texture: manipulation pixels - picardlimpens/TechArtsNum GitHub Wiki

// Exemple d'images: https://www.google.fr/search?q=marilyn+warhol&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiWj_WP7JLKAhVCRxoKHWbiAnwQ_AUIBygB&biw=1440&bih=711

PImage img;

void setup() {

  background(0);
  smooth();

  img = loadImage("marilyn.jpg");
  size(img.width*2, img.height);

  image(img,0, 0); 

  noStroke();
  for(int i=0; i<=((img.width)-4); i+=4) {
    for (int j=0; j<=((img.height)-4); j+=4){
      color pix = img.get(i, j);
      fill(pix,128);
      float taille = random(20,50); 
      ellipse(i+width/2,j, taille,taille);
    }
  }
}

void draw() {

}