1

Help! I'm trying to cut a person with fairly complex hair from a background. I've got a result I'm fairly happy with inside Photoshop

curly hair on transparent background

I've used a couple of blend layers (multiply, darken) to make sure it looks good (enough) on black as well. My background is lighter than black so this should be fine.

curly hair on black background

The problem is when I combine layers/export, my blend layers seem to lose their effect and I end up with this (Background is just to make it easier to see what I mean, ultimately I want to export it with transparency in the background):

Curley hair on dark background with unwanted artefacts

Is there a way to export the pixels as I am seeing them in Photoshop without losing transparency? The only way I can currently get this to work is by flattening the image and exporting as a JPG, but this is not ideal for my usecase.

I read putting the layers in a group with blend mode set to normal works, but it doesn't for me, as soon as I do this, I see the third image within photoshop.

2 Answers 2

0

Blend modes can not be exported to other file formats. The information can not be embedded into a transparent PNG for web use for example.

If you are exporting for a web application you can re-define some blending modes using CSS, but that is it.

Some applications recognize the information of a PSD file to some extent, for example GIMP.


You are seeing the white pixels because they are white pixels. A Blend mode will show you a modification in the interaction of those white pixels with another layer, but that modification is done "on the fly" showing it to you.


What you can do, is:

  • Use the information of the transparency, and save it as a mask.
  • Flatten a copy of your image so you get the black background.
  • Use the mask you generated and apply it on the black version.

That way you will have black pixels instead of white ones.


This white halo is due to the imperfect nature of the mask or transparency border.

I am explaining a bit more here: How to make a b&w mask identical with the image in photoshop?

2
  • Thanks for confirming @Rafael. I will see if I can go for your first suggestion. If not I will flatten and export with a colour background instead of transparency. It should still work for my web use case.
    – Ash Hekmat
    Dec 13, 2023 at 15:13
  • If your image really needs to float, for example, a parallax effect, the transparency will help a lot.
    – Rafael
    Dec 13, 2023 at 20:57
0

Obviously you expect something like this (only 4 hairs drawn to get them sharp enough in a screenshot)

enter image description here

Every hair should have hard colored nearly opaque core and around the core every hair should have more or less transparent outer layer with more or less glossy surface. A hair has such complex structure when one watches it with a microscope.

Everything looks right against any background; there's only white grey and black in my example.

Unfortunately such resolution is unavailable. You may succeed to make a layer mask or otherwise remove the background successfully if the photographer happens to be up to the task (perfect light and background intended for the forthcoming background removal, high quality equipment, pro knowledge). But in the problematic sparse hair area the hairs are only 1...2 pixels wide. They cannot have any zones. They fit only to a certain background. Sometimes you may succeed to adjust their color, brightness and transparency for another background, but do not expect the adjustments are good or even acceptable if you change the background again.

The thin end of my artificial hairs is as thin as one can expect to get to a photograph. As you see they have same problems as your hairs; they should be adjusted for every background differently.

If you inserted the hair sample as a high resolution PNG with transparent background you would have a theoretical possibility to get some proper guidance for your current case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.