Files
sunny9898/task10/task2/code/capture copy 3/wk5_example4.pde
louiscklaw 5637fbf94f update,
2025-02-01 02:07:58 +08:00

33 lines
643 B
Plaintext

// Pas de deux (1968) by Norman McLaren
import processing.video.*;
Movie movie1;
PImage tempImage;
void setup() {
size(960, 720);
movie1 = new Movie(this, "Pas de deux excerpt 1.mp4");
movie1.loop();
tempImage = createImage(width, height, RGB);
}
void draw() {
image(movie1, 0, 0);
// blend two frames, select the brightest pixel
blend(tempImage, 0, 0, width, height, 0, 0, width, height, LIGHTEST);
}
void mousePressed() {
if (mouseButton == LEFT) {
tempImage.blend(movie1.get(),0,0,width, height,0 ,0,width, height, LIGHTEST);
} else if (mouseButton == RIGHT) {
}
}
void movieEvent(Movie m) {
m.read();
}