Add two layers pixel-wise for all channels in Photoshop

D
Posted By
d99alu
Jan 1, 2006
Views
355
Replies
4
Status
Closed
Hi!

I’m looking for the simple operation to add two layers pixel-wise for all channels in Photoshop (ver. 8). I find adjustments layers and blending options for Multiply, Difference and so on, and I find Arithmetic’s for adding in gray scale and separate channels, but all I want to do is just to add two layers pixel by pixel for all channels. That is:
out_image = in_image_1 + in_image_2

I also would like to do the simple operation
out_image = input_image * k + m

I have been searching the net for quite some time, if anyone could give

me a hand here, that would be most appreciated.

regards,
Andreas Lundgren – Sweden

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

BH
Bill Hilton
Jan 1, 2006
Andreas Lundgren writes …

I’m looking for the simple operation to add two layers pixel-wise for all channels in Photoshop (ver. 8).
That is: out_image = in_image_1 + in_image_2

You can usually figure out a way to do operations this by getting the actual formulas for the various blending modes and figuring out how to apply them. For example, the formula for the "Add" mode is ((source 2 + source 1)/scale) + offset => destination … so with scale = 1 and offset = 0 you’ll get what you need … access this command in Photoshop CS with Image – Apply Image, the defaults for scale and offset are already set to 1 and 0 … this will do the trick.

I also would like to do the simple operation
out_image = input_image * k + m

Did you mean (input_image * k) + m or input_image * (k+m) ? Either way

I think you can figure this out with the blending mode formulas too, though the straight ‘multiply’ command is ((source 1) x (source 2))/255

so you may need to combine multiple operations … if you just multiply

without the divide-by-255 you’ll quickly get far too much black …

I have been searching the net for quite some time, if anyone could give me a hand here, that would be most appreciated.

Hope this helps … try to find a list of formulas for the blend modes (I got mine from the "Photoshop Artistry" books) and realize you might need to run two operations to get the result you want and it should make sense.

Bill
BH
Bill Hilton
Jan 1, 2006
if you just multiply
without the divide-by-255 you’ll quickly get far too much black

oops, change ‘black’ to ‘white’ 🙂
D
d99alu
Jan 1, 2006
Thanks Bill!
MR
Mike Russell
Jan 1, 2006
wrote in message
I’m looking for the simple operation to add two layers pixel-wise for all channels in Photoshop (ver. 8). I find adjustments layers and blending options for Multiply, Difference and so on, and I find Arithmetic’s for adding in gray scale and separate channels, but all I want to do is just to add two layers pixel by pixel for all channels. That is:
out_image = in_image_1 + in_image_2

I also would like to do the simple operation
out_image = input_image * k + m

Hi Andreas,

Use the "Add" blending mode for Image>Calculations. Add supports a scaling factor, which you may use, with a little trickery, to get your second result. Start with a black image, and perform two add operations, one with the scale value K and one without. The scale factor may also be used to prevent overflow after an add operation.

You will need to repeat the calculation for each channel – record these operations into an Action.

Mike Russell
www.curvemeister.com

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections