The IlvBlendFilter Class
The IlvBlendFilter class lets you blend two images A and B using various modes.
The blend modes define the following formulas:
Normal Blend Mode:
cr = (1 - qa) * cb + ca Multiply Blend Mode:
cr = (1 - qa) * cb + (1 - qb) * ca + ca * cb Screen Blend Mode:
cr = cb + ca - ca * cb Darken Blend Mode:
cr = Min((1 - qa) * cb + ca, (1 - qb) * ca + cb) Lighten Blend Mode:
cr = Max((1 - qa) * cb + ca, (1 - qb) * ca + cb) where:
cr | Result color (RGB) - premultiplied |
qa | Opacity value at a given pixel for image A |
qb | Opacity value at a given pixel for image B |
ca | Color (RGB) at a given pixel for image A (premultiplied) |
cb | Color (RGB) at a given pixel for image B (premultiplied) |
For all blend modes, the resulting opacity qr is computed as follows:
qr = 1 - (1 - qa) * (1 - qb)
Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.