Introduction
This chapter focuses on yet another very exciting topic of the HTML5 Canvas, images and videos. Along with providing basic functionality for positioning, sizing, and cropping images and videos, the HTML5 Canvas API also allows us to access and modify the color and transparency of each pixel for both mediums. Let's get started!
Host all the recipes on a web server (I used IIS) as a few recipes will not work on the local file://protocol
. For security reasons, methods such as getImageData()
require a web server to function.