Why a cutout gets a white edge — and how to remove it
A white edge is a thin rim of the old background that survives around a cutout — usually one to three pixels wide, and most visible against a dark backdrop. It happens because the matte is only an estimate of the boundary: pixels that are half subject and half old background keep some of the old colour.
The fastest diagnosis is a second opinion on the same photo: remove a background in your browser and compare the rim with the file you already have.
Where the pale pixel comes from
The model sees your image at 320 × 320. On a 1600 × 1600 export one model pixel covers five pixels of the original, so a boundary that looks clean in the matte is still soft in the file. Where the subject meets a white backdrop, that soft band is a mix of two colours: the subject, and the background you wanted gone.
Our pipeline handles it in two passes. A guided filter rebuilds the edge at full resolution using the real pixels as a guide, then the matte is tightened — a 2 px erosion followed by a smoothstep ramp — so the half-background band is pushed inward instead of being left semi-opaque. What survives is the subject, not the old backdrop blended into it.
How to get rid of it
- Confirm it is a rim, not noise.Zoom to 300 % against a dark background and check that the pale line follows the subject outline, which is the signature of leftover background.
- Start from the largest original you have.A re-saved or screenshotted JPEG has already baked a fringe into the pixels, and no downstream pass can tell that fringe from the subject.
- Run the cutout on that original.The guided filter and the 2 px alpha erosion need the real full-resolution pixels, not a previous export that was already flattened.
- Judge it on a dark colour.Check the PNG on a black or deep green panel, because a white page will happily hide the exact artefact you are looking for.
- Export once, at the size you need.Ask for up to 4096 px on the long edge, or 16 megapixels, so the refined edge is not resampled a second time on the way to print.
When a rim is not the tool's fault
One case stays outside our reach: a subject photographed against a white background with a light halo from the lens or a studio reflector. Those pixels are genuinely pale in the original, so tightening the matte makes the cutout smaller rather than cleaner. Shrinking the selection by a pixel or two is the honest fix there, and it still leaves a faint bright line on very dark surfaces.
The other case is a cutout that was saved as JPEG after the fact. JPEG has no alpha channel, so the transparent area is filled with a solid colour — usually white — before the file is written. If your PNG will be used on a coloured page, keep it as PNG all the way to the end.
Questions
Why does the white edge only show on a dark background?
Is the halo my photo, or the tool?
Can I recover the old background from the cutout PNG?
Does exporting at a larger size remove the white edge?
Last updated: 3 December 2026
Related
If the rim is the symptom, the file format is the other half of the story, and a batch is the fastest way to check whether one photo or all of them are affected.