class BlendMode extends EffectQualifier

Defines the mode of blending to use when overlaying an image.

Learn more: Overlay blending effects

Methods

multiply()

Add an overlay image blended using the 'multiply' blend mode.

screen()

Add an overlay image blended using the 'screen' blend mode.

overlay()

Add an overlay image blended using the 'overlay' blend mode.

mask()

Add an overlay image blended using the 'mask' blend mode.

antiRemoval(int $level = null)

Add an overlay image blended using the 'anti-removal' blend mode.

Details

static BlendMode multiply()

Add an overlay image blended using the 'multiply' blend mode.

In this mode, each pixel of the image is made darker according to the pixel value of the overlaid image.

Return Value

BlendMode

static BlendMode screen()

Add an overlay image blended using the 'screen' blend mode.

In this mode, each pixel of the image is made brighter according to the pixel value of the overlaid image.

Return Value

BlendMode

static BlendMode overlay()

Add an overlay image blended using the 'overlay' blend mode.

In this mode, each pixel of the image is made darker or brighter according to the pixel value of the overlaid image.

Return Value

BlendMode

static BlendMode mask()

Add an overlay image blended using the 'mask' blend mode.

In this mode, each pixel of the image is 'cut-out' according to the non-transparent pixels of the overlaid image.

Return Value

BlendMode

static BlendMode antiRemoval(int $level = null)

Add an overlay image blended using the 'anti-removal' blend mode.

In this mode, the overlay is slightly distorted to prevent easy removal.

Parameters

Name Type Description
$level int The level of distortion. (Range: 1 to 100, Server default: 50)

Return Value

BlendMode

Constants

MULTIPLY

Each pixel of the image is made darker according to the pixel value of the overlaid image.

SCREEN

Each pixel of the image is made brighter according to the pixel value of the overlaid image.

OVERLAY

Each pixel of the image is made darker or brighter according to the pixel value of the overlaid image.

MASK

Each pixel of the image is 'cut-out' according to the non-transparent pixels of the overlaid image.

ANTI_REMOVAL

The overlay is slightly distorted to prevent easy removal.