GMU:Processing im Park/Emilio Aguas/Code Blinky Eye

From Medien Wiki
< GMU:Processing im Park‎ | Emilio Aguas
Revision as of 23:53, 25 January 2016 by EmilioAguas (talk | contribs) (Created page with "====--- Processing3.0 Code--- ==== <source lang="java"> import processing.video.*; Movie movie; void setup() { size(640, 360); movie = new Movie(this, "panorama.m4v"); ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

--- Processing3.0 Code---

import processing.video.*;

Movie movie;

void setup() {
  size(640, 360);
  movie = new Movie(this, "panorama.m4v");
  movie.loop();
  background(0);
  frameRate(120);
}

void movieEvent(Movie m) {
  m.read();
}

void draw() {
  int x = int(random(movie.width));
  int y = int(random(movie.height));
  image(movie, 0, 0, width, height);
  color pix = movie.get(x, y);
  tint(pix, 40);
  saveFrame("line-######.png");
}