Video Tint Prototype in Processing

Learning to use video in Processing while adding basic tint colours

RAW code

/**
* Loop.
*
* Shows how to load and play a QuickTime movie file.  
*
*/

import processing.video.*;

Movie movie;

void setup() {
 size(640, 360);
 background(0);
 // Load and play the video in a loop
 //movie = new Movie(this, “dave.mp4”);
 movie = new Movie(this, “testkittib.mp4”);
 movie.loop();
}

void draw() {
 if (movie.available() == true) {
   movie.read();
 }
 //Escribe de arriba hacia abajo ergo si el de abajo es mas grande tapa los de arriba sobreescribe
 noTint(); //aplica usar color original o mejor no usar color
 image(movie, 0, 0, width, height); //tama;o video completo x1 en cero, y1 en cero, x2 el ancho, y2 el largo
 tint(0,255,0); //aplica el color a los de abajo si es el ultimo a todos videos de abajo en RGB    
 image(movie, 0, 0, width/2, height/2); //divides the video by half in esquina izquierda arriba x,y,x/2,y/2
 tint(255,0,0);
 image(movie, width/2, height/2, width/2, height/2); //esquina derecha abajo

}


from Tumblr http://ift.tt/2n3EPQD

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s