4

For example, if two grayscale images, one with a intensity and the other with b intensity, are added the resultant image should be of a + b intensity.

  • What about the Screen or Multiply blending modes does not fit your needs? – Vincent Nov 18 '14 at 14:49
  • 2
    linear light is an add operation – joojaa Nov 18 '14 at 15:25
  • 3
    @joojaa, the only clean add operation is linear dodge. Linear light does add, but also subtracts, which is why it's grouped with "Overlay". You can see an important use of linear light blending here: creativepro.com/article/… – Alan Gilbertson Nov 18 '14 at 16:06
  • @AlanGilbertson Ah sorry yes remembered wrong dodge it is, now that i have ps in front of me – joojaa Nov 18 '14 at 16:07
  • @joojaa I've never done that (ha! I wish...). It was a coincidence that I'd written that linked article just last week. Frequency separation retouching is the only technique I've come across that explicitly requires Linear Light, so it was fresh in my mind. – Alan Gilbertson Nov 18 '14 at 16:26
5

As with almost anything in Photoshop, there are several ways to do this, depending on what fits your needs and your workflow.

Among the Blend modes, Add is called "Linear Dodge". It says that, in fact, right in the menu. You can, therefore, place your images one above the other and apply Linear Dodge to the upper one. All of the "Lighten" Blend Mode group are variations of Add, but Linear Dodge is a straight arithmetic operation. All of the calculations involved in the different blend modes are documented here.

If you are specifically looking for grayscale output, Calculations (Image > Calculations) has been around since the Pharaohs, or thereabouts. This allows you to (among many other things) Add two channels to create either a new channel or a new grayscale document. This works across images, not just with layers. The two images must have exactly the same size pixel dimensions.

Calculations is unique in that it can take the gray values of an RGB image and blend them with the gray values of another RGB image to produce a grayscale output.

Another that's been around since Noah is Apply Image. Once again, Image > Apply Image can be used with two channels in one document, a channel with the RGB composite "channel" of the same document, or either of those across two documents of the same dimensions. It's different from Calculations because it does not create a new channel or document, and its output will be in a color mode if applied to a color composite.

  • You can also do this with masks etc. but i think 3 ways is good enough. – joojaa Nov 18 '14 at 16:23
  • The rest, as they say, is left as an exercise for the reader... (Calculations or Apply Image rock for creating masks.) – Alan Gilbertson Nov 18 '14 at 16:31
  • @AlanGilbertson this is what I needed. Thanks. – Dilip Raj Baral Nov 19 '14 at 5:49
1

If you have two grayscale images, then multiply will do the trick. Except you should understand, that there is a limit to that. Max intensity is 255, so if on first layer intensity is 150 and on second the same, resulting intensity will be only 255, not 300, because it's technically impossible.

  • 1
    Multiply is a multiplication operation, not addition. When image values are added, the image becomes lighter. Multiply always results in a darker image unless the layer is pure white or pure black. – Alan Gilbertson Nov 18 '14 at 17:10
  • Question was about calculating sum of two image intensity, in this case multiply is the best choice. – mrserge Nov 18 '14 at 17:19
  • 1
    Um, no. The question is "how do you arithmetically add two images". Intensity could have a variety of meanings in this context, but since the OP is a Stack Overflow and SU user, he's probably a developer. I'm willing to bet he means exactly what the question says. – Alan Gilbertson Nov 18 '14 at 18:12
  • 1
    Intensity could mean highlights, contrast, shadows, or gamma depending on what you're trying to achieve. – Alan Gilbertson Nov 18 '14 at 22:45
  • 1
    @mrserge you mean addition result more than 255 truncating to 255? I know that. :) Thanks. – Dilip Raj Baral Nov 19 '14 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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