Forma saysCanvas can read and rewrite raw pixels with getImageData/putImageData — the basis of filters and effects.
Beyond drawing shapes, canvas exposes the actual pixels. getImageData(x,y,w,h) returns a flat array where every four numbers are one pixel's red, green, blue, alpha (0-255). Edit that array and putImageData writes it back.
This is how invert, grayscale, and threshold filters work: loop the array four values at a time and transform each channel. It's CPU work, so for big images or live video, push it to a Web Worker or WebGL.
Power-ups you unlock
getImageData → flat [r,g,b,a, r,g,b,a, …] array
Each pixel is 4 entries (0-255)
Transform the array, then putImageData to apply
Heavy work — offload big jobs to a worker / WebGL
Captain Invalid Input attacks — common mistakes
Forgetting pixels come in groups of 4 (rgba), looping by 1
Reading pixels from a cross-origin image (tainted canvas error)
Doing per-pixel work on huge images on the main thread
Boss battleDraw something, then invert every pixel (255 minus each RGB channel) with get/putImageData.