# Blend modes for composing images?

I'm looking for a way to combine two images with standard image blending methods like Darken, Color Burn, Color Dodge, Soft Light. Is there a way to achieve these with ImageCompose or Overlay?

## 1 Answer

Use ImageApply with a list of images. You just need to get the formula right.

An example of "Screen" mode:

blend["Screen", u_, l_] := 1. - (1. - u)*(1. - l)
ImageBlend[mode_String, upper_Image, lower_Image] :=
ImageApply[blend[mode, #1, #2] &, {upper, lower}]


An example to play with "Screen" mode:

lowerImg = ExampleData[{"TestImage", "Lena"}];
upperImg =
ImageAdjust@
GaussianFilter[Image[RandomReal[1., ImageDimensions@lowerImg]],
4.];

ImageBlend["Screen", lowerImg, upperImg]


• Can you add color dodge? – M.R. Jan 8 at 15:42