A customer sent me an image on a white background, to be printed as a waterslide decal. On a trasparent background. Removing his white background was my challenge. Some parts of the image close to the border where white (or nearly white), so the gimp “fuzzy-tool” + alpha channel trick couldn’t be used. For another image it could be used, but some shades in the middle of the image where white and should not have been removed. I needed anyway to import inside the image Inkscape to drive the decal printer. So I decided to remove the background directly within Inkscape.
I import the image (the blue rectangle is to show the white background on the image). Then I use the “Trace bitmap” utility, to extract the face from the background (selecting “remove background” as in the picture).
Inkscape extracts a group of (in this case 7) paths from the image, each with a different colour, which is of no interest for my purpose: I will unite them to get a unique path with the shape of the image to be kept and I will colour it in red.
Now I need a full shape with the same outline, so I will remove the internal nodes of the path, leaving the full shape exactly superimposed on the original image. Now it’s enough to select both and use the “Object->clip->set” commad, to cutout the final shape:
And the face without background is there: