Photo to line art and transparent parts

Hello, how can you edit a photo so that you then only get the outlines? In the end, only the outer and inner lines of the person in the photo, for example, should be visible. In addition, the result should also be transparent, i.e. the individual parts of the image, inside the lines, should also be transparent, so that I can use it on different backgrounds (and see the background inside the image). How can this be done?
Thanks in advance for your help

This should work:

Make selection of background/unwanted outside:

Delete selection:

Invert selection and shrink it by 2 or 3 pixels (amount depends on what you like/need) and delete this selection:

You now have access to the outline, but it still has the original colour setting. You can refine this (make it black for example) by selecting everything that is not opaque and use, for example, the fill tool set to black.

The above example was a very quick and easy one done in Krita, but this technique can also be used in GIMP/PS and the likes.

The hard part is creating the mask.

2 Likes