finds.dev← search

// the find

desandro/close-pixelate

★ 728 · JavaScript · updated Apr 2012

Pixelate an image with <canvas> a la Chuck Close

A canvas demo that renders images as layered pixel patterns in the style of Chuck Close's portrait paintings. You pass an array of layer configs—shape, resolution, offset, alpha—and it composites them on a canvas element using raw imageData. A 14-year-old art toy, not a library you'd ship.

The layering model is genuinely clever: stacking multiple passes with different shapes and offsets produces results that look like actual Close paintings rather than just pixelation. The imageData approach is correct—reads pixel colors once per layer, no per-pixel DOM writes. API is minimal and does exactly what it says.

Last commit was 2012; the canvas API has moved and modern CORS handling is different from what the README describes. Same-domain restriction is presented as a hard limit but that's fixable with proper CORS headers on the image server—the README doesn't mention that. No npm package, no module system, globals only. The 'one pixel sampled per cell' approach gives blocky, inaccurate color for anything but solid regions; averaging the region would be more faithful but was never added.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →