Stained glass effect on an image

Split your photo into colored polygonal cells separated by black outlines, for a stained-glass-window rendering. Adjust the number of cells for a finer or coarser pattern.

Example:
Drag and drop an image, or click to browse. 25 MB max.

How it works

The tool places a set number of random points on the image, then assigns each pixel to its nearest point (a Voronoi diagram), forming irregularly shaped cells. The average color of each cell is calculated and applied uniformly, and a dark outline is drawn between cells to mimic the lead of a stained glass window.

Why is the result limited in resolution?

Computing the cells compares every pixel to all generated points, which becomes costly on large images. The image is therefore resized to a maximum of 420 pixels per side before processing, which is more than enough for a readable stained-glass rendering.

How many cells should I choose?

A low number (20 to 50) gives large blocks of color for an abstract look, while a high number (150 to 220) brings the result closer to the details of the original photo while keeping the fragmented stained-glass appearance.

All the computation (cell generation, color averaging, outlines) runs in your browser in JavaScript: your image is never sent to a server.