Heart collage
Arrange several images on one canvas through a heart-shaped mask: each cell is scaled to a square and filled in order, the outside stays transparent or takes a solid colour, and both grid density and cell size are adjustable.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Images are processed locally in your browser with Canvas and never uploaded.
A denser grid gives a smoother heart — 8–24 looks good, the range is 1–64.
Pick one or more images first (PNG / JPEG / WebP / GIF all work).
Result details
Pick images and they are arranged into a heart right away; the outside is transparent or the colour you choose.
What this tool does
- Build a heart photo wall: drop 10–30 images in and they fill the heart cells in order, ready for Valentine or anniversary artwork.
- Transparent hearts: leave the outside transparent and the PNG can be placed over any background or video.
- Single image mode: with one image the whole picture is scaled and repeated across the heart cells, which works well for avatars and covers.
- Different from the collage tool: that one lays every image out on a grid (one cell each), this one masks a shape and cycles the same images through the cells.
Example
Input
One flat red 2×2 image with a 12×12 heart grid, 4 px cells and no background colour
Output
A 48×48 canvas with red heart cells (alpha 255) and pixel (0,0) fully transparent
From the pure heartCollage logic: the mask comes from (x² + y² − 1)³ − x²y³ ≤ 0, and far fewer than 144 cells qualify, so many pixels stay transparent. With #ffffff, (0,0) becomes opaque white.
Frequently asked questions
How is the heart shape computed?
With the classic implicit curve `(x² + y² − 1)³ − x²y³ ≤ 0` evaluated per cell, with a horizontal stretch factor (1.15 by default) so the heart looks fuller. Matching cells take an image, the rest follow the background setting.
What if the image count does not match the cell count?
Images cycle: when there are more cells than images the sequence restarts, and surplus images are simply not used. The result panel shows both the heart cell count and the number of images so you can adjust.
Are the images cropped?
Each image is squashed to a square (area-averaged), so non-square images distort slightly. Crop them to squares first with the centre crop tool if you want to avoid that.
How do I control the output size?
The output is grid size × cell size; for example 12 cells at 40 px gives 480×480. The 16-million-pixel ceiling still applies and oversized values report an error instead of failing silently.
Are my images uploaded?
No. Pixels are read through the canvas and processed entirely in the browser; there is no upload endpoint on the page.
Keywords:heart collage