[*]: The components of the first source image pixel are (Rd,Gd,Bd,Ad), and the components of the second source pixel are (Rs,Gs,Bs,As). Function f = min(As,1-Ad). The first source image is also the destination image.

The blending formula for in-place processing is:

Cd = Cd*D + Cs*S

where Cd is the destination pixel (Rd,Gd,Bd,Ad), Cs is the source pixel (Rs,Gs,Bs,As), and D and S are the blend factors for the destination and source, respectively.

Parameters

Each of the functions takes the following arguments:

src1dst

Pointer to the first source and the destination image.

src2

Pointer to the second source image.

cmask

Channel mask to indicate the alpha channel. Each bit of the mask represents a channel in the image. The channel corresponding to the 1 bit is the alpha channel. cmask must be either 0x01 or 0x08.

Return Values

Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.