November 2011
Intermediate to advanced
348 pages
7h 2m
English
The purpose of this recipe is to demonstrate how to perform pixel manipulations on videos in much the same way as we did with images. In this recipe, we'll invert the colors of a short video clip.

WARNING: This recipe must be run on a web server due to security constraints with the getImageData() method.
Follow these steps to invert the colors of a video:
window.requestAnimFrame = (function(callback){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || ...Read now
Unlock full access