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
  • 51,882
  • 13
  • 139
  • 180
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
  • 14,136
  • 6
  • 46
  • 59
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
  • 55,781
  • 9
  • 100
  • 149