0

I'm having a little bit of trouble exporting a bunch of semi-transparent layers from a PSD file in Photoshop.

If I export the layers alone one by one (by hiding all other layers) and compose them in my app they look different, e.g. they seem to have less transparency or more white color in them.

I've been googling about this issue for a while now and so far I only know that is has something to do with layer blending.

Is there a way to export the layers so that they will look the same when I bring them all together?

Edit:

Here are some screenshots:

Design in photoshop:

Photoshop design

Inside the app (after exporting and combining same layers):

App

5
  • Show screenshots for clarity, please Sep 24, 2016 at 13:14
  • If you're using blending modes the answer is no, but we need more specifics (preferably some screenshots with layers and what blending modes if any etc.)
    – Cai
    Sep 24, 2016 at 22:50
  • @Ryanthehouse I've added some screenshots, please take a look.
    – iosdude
    Sep 25, 2016 at 9:10
  • I read some more on blend modes in photoshop and by now I'm pretty sure it's what causing this. I guess now I need to figure out how to make it happen in code... It would be easy to do if the images were static but there are lots of animations going on, this are showing up and going away. I wish the designer didn't use this stuff :)
    – iosdude
    Sep 25, 2016 at 9:13
  • @Cai These layers use blending modes 100% I checked it in the Layers panel. Some use Screen, others Overlay.
    – iosdude
    Sep 25, 2016 at 9:16

1 Answer 1

1

Both screen and overlay are easy to implement, Wikipedia lists formulas for all of the modes. Screen is:

value = 1-(1-Bottom)(1-Upper)

where Bottom is the per channel value of bottom layer and Upper is the per channel value of Upper layer. All colors are assumed to be in 0-1 range. Overlay is listed as:

value = Bottom*Upper*2 if Bottom < 0.5
value = 1-2*(1-Bottom)(1-Upper) if Bottom >= 0.5

Now this is all easy to implement if you have a environment where you can actually manipulate things like this, such as a game etc. However if you work on a webpage or other scene graph system with no shader access then you end up in a situation where you can not easily dominate the object model to do your bidding without taking a undue amount of the effort to your own name. But that is a question for stackoverflow.

Your Answer

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

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