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
overlayInputArrayAn 8-bit RGBA or BGRA image with the same size and color channel order as the background.
backgroundInputArrayAn 8-bit image with three or four channels. A three-channel background is treated as opaque.
dstOutputArrayOutput 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.
opAlphaCompositeOperationsThe compositing operation.
premultipliedboolTrue when the input alpha is premultiplied. The output uses the same alpha convention if it has four channels.