Sampling images with a canvas element requires a bit of know-how around how images are technologically rendered.
If we analyze an image being displayed on a screen, looking very closely (or very zoomed in), you’ll see the image is composed of many little pixels that when used together, form the whole image.
To sample and manipulate an image with canvas, we must loop over every pixel within an image, and store its color data within a canvas object we can interact with. Once you get through this process, you’ll be able to manipulate your image in an unlimited number of ways that just wouldn’t be possible otherwise.
Hey Chris! I Seem To Be Having An Issue Uploading The Image! I Got This Error At 1:16 In The Video.
Error:
(anonymous) @ (index):14
localhost/:1 Access to image at 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/35418/charizard.png' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.