Advertisement


Transparency to unpremultiplied RGB + Alpha


Question

I have a transparent layer in Photoshop CS5 (so internally, it's most probably stored as unpremultiplied RGB component plus an alpha component per pixel).

Now I want to transform this to an opaque layer (just unpremultiplied RGB) + a alpha mask. the result should look the same as the original.

I can't just underlie the transparent layer with black, take the selection from it as a mask and merge the layers, because this would result in the alpha being premultiplied in the RGB values.

I hope you understand the problem and can give me a solution to it.

As an alternative explanation: I want the REVERSE process of this:

  1. create a new layer and paste in any image
  2. create a mask with a white-to-black gradient
  3. apply the layer mask

Explanation images:

State A: enter image description here

State B: enter image description here


IMPORTANT: the layer is just for this example fully constant red - but you could think of any arbitrary image instead of the constant red. so - to go from state A to State B, one simply has to apply the layer mask.

I want to know how to go from State B to State A.

2012/03/16
1
16
3/16/2012 8:37:00 PM

I completely understand your pain. Here is my solution :)
Extract Alpha as Mask Action
Here is what it does:

enter image description here Edit:
enter image description here
I hope this helps :)

2011/03/15
6
3/15/2011 1:33:00 PM