0

how-does-photoshop-blend-two-images-together

somebody could explain how photoshop combine two pictures with DIVIDE mode? i want to implement this effect in java or c++.

Community
  • 1
  • 1

3 Answers3

1

Since multiply is this:

#define ChannelBlend_Multiply(A,B)   ((uint8)((A * B) / 255))

Divide must be:

#define ChannelBlend_Multiply(A,B)   ((uint8)((A / B) * 255))
Pubby
  • 50,432
  • 13
  • 129
  • 175
0

This page on wikipedia should help you: http://en.wikipedia.org/wiki/Blend_modes#Divide.

Pixel operation in blending mode are quiet simple operations. So you should manage to write code with the explanations on the webpage.

Patrice Bernassola
  • 13,830
  • 4
  • 44
  • 55
0

Take the three images: output and two inputs, and analyze their pixel values. You should be able to work out the formula by fitting samples from the image data data to some equations. I wouldn't make assumptions that Photoshop's divide blend is. If you like that effect, duplicate that effect.

Kaz
  • 51,856
  • 9
  • 92
  • 143