• fullscreen
  • ImageGetExtended.pde
  • PImage peach;
    
    void setup() {
      size(387, 382); 
      peach = loadImage("peach.jpg");
      noStroke();
      background(255);
    }
    
    void draw() {
      float r = random(10,50);
      if (mousePressed){
      color c = peach.get(mouseX, mouseY);
      fill(c, 102);
      ellipse(mouseX, mouseY, r, r);}
       saveFrame("images/export-"+"-#####.jpeg");
    if ( frameCount >= 6000 ) {
           exit();
       } 
    }
    
    void keyPressed(){
        if (key == 'n'){
        background(peach);}
        if (key == 'b'){
          filter(BLUR);
    }
    if( key =='w'){
      background(255);
    }
    if( key =='d'){
      background(0);
    }
    }
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running in HTML5 using Processingjs.

    license

    advertisement

    Justin Lincoln prof+

    ColorGetDemo

    Add to Faves Me Likey@! 1
    You must login/register to add this sketch to your favorites.

    A slight expansion of some code I picked up at a Summer workshop with Casey Reas.

    mousePressed brings up random sized ellipse of color from a base image.

    n key reveals the background image
    b key blurs the image (photo and/or drawing)
    w key returns to a base white background
    d key creates a black background to draw on.

    You need to login/register to comment.