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++.
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++.
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))
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.
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.