Overview
Introduction
This tool removes a stroke or outline ring from around a PNG's shape by eroding its alpha silhouette, computed entirely client-side.
It's the inverse of adding a shape-hugging stroke: instead of growing the canvas outward with new color, it clears the outermost ring of the existing shape to transparent.
What Is PNG Stroke Remover?
An erosion tool that checks every opaque pixel for a transparent neighbor (or the canvas edge) within the requested thickness, and clears it to transparent if one is found.
The canvas dimensions never change; only how much of it is visible does.
How PNG Stroke Remover Works
For each opaque source pixel, the tool searches a bounded neighborhood within the chosen thickness for any transparent pixel or the edge of the canvas.
If one is found, that pixel is part of the outer boundary ring and gets cleared to fully transparent; pixels deep enough inside the shape that no boundary lies within range stay untouched.
When To Use PNG Stroke Remover
Use it to strip an unwanted colored outline or border off an icon or sticker asset before re-processing it.
It's also useful for shrinking a shape's visible silhouette slightly, for example to compensate for a stroke that will be added later elsewhere.
Often used alongside PNG Stroke Adder, PNG Outline Adder and PNG Outline Remover.
Features
Advantages
- Runs entirely client-side; your image never leaves the browser.
- Preserves canvas dimensions, so downstream layout math doesn't shift.
- Works on any shape, not just rectangles.
Limitations
- Thin details (features narrower than twice the chosen thickness) can be eroded away entirely rather than just having their edge trimmed.
- Very thick erosion on large images can be slow, since the neighborhood search scales with the square of the thickness.
Examples
Best Practices & Notes
Best Practices
- Preview the result before downloading; thin shape details can vanish entirely at higher thickness values.
- Use the same thickness you originally used to add a stroke, for a clean matching removal.
Developer Notes
The pure erosion math lives in a lib function operating on a plain Uint8ClampedArray pixel buffer with no DOM dependency, using a bounded neighborhood search per opaque pixel rather than a full distance-transform, since thickness values in practice stay small; only the surrounding component touches an actual <canvas> element.
PNG Stroke Remover Use Cases
- Stripping an unwanted colored outline off an icon
- Shrinking a shape's silhouette before adding a different effect
- Cleaning up a sticker asset that has excess border baked in
Common Mistakes
- Choosing a thickness larger than half the width of thin shape details, which erases them instead of just trimming their edge.
- Expecting the canvas to shrink — erosion only changes which pixels are visible, not the image's dimensions.
Tips
- Check the transparency checker tool afterward to confirm how much of the image ended up transparent.
- If a shape disappears entirely, try a smaller thickness value.