Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

5.7. Manipulating video

Back in the first section of this chapter, I mentioned how the drawImage method can accept a HTML5 video element as input. It's now time to explore this interesting and exciting area of image manipulation in canvas, by pixelating a video. Now, if you're expecting video manipulation to be difficult, then I';m afraid you're going to be severely disappointed; it's hardly any different to manipulating images! However, it's definitely much cooler.

5.7.1. Creating the HTML5 video element

Before you can start doing the cool stuff, you need to set up the HTML5 video element. Insert the following inside of the body element of the HTML page.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint