Table of Contents

Method AlphaComposite

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

AlphaComposite(InputArray, InputArray, OutputArray, AlphaCompositeOperations, bool)

Composites an image with alpha onto a background using a Porter-Duff operator.

public static void AlphaComposite(InputArray overlay, InputArray background, OutputArray dst, AlphaCompositeOperations op = AlphaCompositeOperations.Over, bool premultiplied = false)

Parameters

overlay InputArray

An 8-bit RGBA or BGRA image with the same size and color channel order as the background.

background InputArray

An 8-bit image with three or four channels. A three-channel background is treated as opaque.

dst OutputArray

Output image with the background's size and type. It can be the background itself. For a three-channel output, the result is written as premultiplied color with the alpha channel dropped.

op AlphaCompositeOperations

The compositing operation.

premultiplied bool

True when the input alpha is premultiplied. The output uses the same alpha convention if it has four channels.