# Spot Healing & Clone Stamp > Remove dust spots and blemishes with seamless healing or a clone stamp. Upload a photo and a list of brush strokes. Heal strokes replace a spot with texture from a nearby area and blend it seamlessly into the surrounding colour and brightness (Poisson-style seamless cloning); clone strokes copy pixels exactly from a source area. Leave out the source of a heal stroke and the tool picks the best-matching nearby area. Download a PNG plus the resolved strokes as JSON for the Lumina photo editor, where they stay editable. Part of usefulweb.app (https://usefulweb.app/). Part of [Lumina](https://lumina.usefulweb.app/) (ownerApp: lumina). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminaspotheal.usefulweb.app/ (interactive tool at https://luminaspotheal.usefulweb.app/tool) - JSON API: POST https://luminaspotheal.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://luminaspotheal.usefulweb.app/api/v1/tool) - OpenAPI: https://luminaspotheal.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://luminaspotheal.usefulweb.app/mcp - tool `lumina_spot_heal` ## Inputs - image (file, required): Image (PNG, JPEG or WebP; up to 8 MB and 16 MP) - strokes (textarea, required): Strokes (JSON list, or a Lumina project with "retouch") - Each stroke: {"mode":"heal"|"clone","points":[[x,y],…],"radius":0.03,"hardness":0.5,"opacity":1,"source":[dx,dy]}. x, y, dx and dy are fractions of width and height (0.5 = middle); radius is a fraction of the longer side (0.002–0.15). Heal strokes may omit "source". Up to 200 strokes, 400 points each, 8000 in total. ## Method - Auto-oriented, display-referred 8-bit sRGB. Points and source offsets are fractions of the width and height; the radius is a fraction of the longer side, so the same strokes fit any size of the photo. - Strokes run in order; each one sees the result of the previous strokes. Heal without a source picks one automatically. - Brush mask: distance from each pixel centre to the stroke path; fully on up to radius × hardness, then a smoothstep fall-off to zero at the radius. Source pixels are sampled bilinearly (clamped to the photo edge) at the stroke position plus the offset. - Clone blends the source pixels in with mask × opacity. Heal solves the Poisson equation of seamless cloning (Pérez, Gangnet & Blake 2003) as a membrane: result = source + c, where c is harmonic inside the stroke and equals target − source just outside it. The 5-point Laplace system is solved per colour channel with conjugate gradients from a coarse-grid starting value (relative residual 10⁻⁴, at most 400 iterations). - Automatic source: 48 candidate offsets (16 directions × 2.2, 3 and 4 stroke radii) inside the photo; the one whose surroundings best match the ring just outside the stroke (mean squared RGB difference) wins, first candidate on ties. - Healing cannot invent content that exists nowhere in the photo: large objects on busy backgrounds need a hand-picked source or several smaller strokes. No AI or content-aware fill.