I asked this on Graphic Design but was unable to get any relevant help from them.

I'm trying to reverse engineer a blending mode I've seen on a picture:

This image was created by someone else using Adobe's Scene7 during a Displacement Map Filter operation. I'm only interested in the blending mechanism, not the distortion.

Unfortunately, I was unable to reproduce this effect on other raster graphics editors. It almost looks like the images were blended with Multiply followed by a recolor operation of some sort. Anyway, I'm trying to figure out the equation used for this type of blending.

If you look at the top left corner of where the images overlap, you can see just a little bit of the background leaking to the foreground image.

The original images have the same dimensions and can be found below:

Any idea on how to duplicate this effect?


That looks like multiplying the front image by the luminance of the shirt behind it.

There are multiple definitions of luminance but for a start, I think you could assume your data is sRGB and follow the transformation to CIE to get the CIE Y component.

| improve this answer | |

To answer the question definitively, I figured out that the blending used is a combination of Multiply and Hue.

After executing a Multiply blend on the input images, pass the result as the background for a Hue blend while using the same foreground image:

Background and foreground images for the Hue blend: on the left, the background (generated by a previous Multiply); on the right, the original foreground.

The resulting image can be seen on this JSFiddle. Don't panic! If you see the code you'll notice it is using the luminosity blend instead of the hue blend. I talked about this problem at the end of my other answer.

Equations for all these blending modes can be found on W3C website.

| improve this answer | |

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.