Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

AlphaCompColorKey

Performs color keying and alpha composition of two images.

Syntax

IppStatus ippiAlphaCompColorKey_8u_AC4R(const Ipp8u* pSrc1, int src1Step, Ipp8u alpha1, const Ipp8u* pSrc2, int src2Step, Ipp8u alpha2, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u colorKey[4], IppiAlphaType alphaType);

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc1, pSrc2

Pointer to the source images ROI.

src1Step, src2Step

Distances in bytes between starts of consecutive lines in the source images.

alpha1, alpha2

Alpha value.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

colorKey

Array of color values.

alphaType

The type of composition to perform (without pre-multiplying). See Table “Possible Values of alphaType Parameter” for more details.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function replaces all areas of the source image pSrc1 containing the specified key color colorKey with the corresponding pixels of the background image pSrc2 and additionally performs alpha composition (see supported Table “Types of Image Compositing Operations”) in accordance with the parameter alphaType. Note the alpha channel in the pDst is not changed after color keying.

The parameter alphaType should not be set to the values intended for operations with pre-multiplying.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or negative value.

ippStsStepErr

Indicates an error condition if one of the step values is less than or equal to 0.

ippStsAlphaTypeErr

Indicates an error condition if alphaType specifies the unsupported type of composition.