Image Processing: Soft-light Algorithm Like Photoshop
I'm a developing soft-light algorithm from scratch for Android base on the docs from Adobe: http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_archives/blend_m
Solution 1:
See this answer for the blending formula:
ChannelBlend_SoftLight(A,B) ((uint8)((B < 128)?(2*((A>>1)+64))*((float)B/255):(255-(2*(255-((A>>1)+64))*(float)(255-B)/255))))
Your code above calculates the blending for one pixel.
a, b
are the 2 different pixels, the aampleNearest
function gets the 2 pixels from the input images.
dst,src
are the 2 input images.
Post a Comment for "Image Processing: Soft-light Algorithm Like Photoshop"