mediaLib Library Functions mlibVideoColorBlendABGR(3MLIB)
NAME
mlibVideoColorBlendABGR,
mlibVideoColorBlendABGResetAlpha - image blend
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
void mlibVideoColorBlendABGR(mlibu32 *dst,
const mlibu32 *src1,const mlibu32 *src2,
mlibs32 src1w, mlibs32 src1h,
mlibs32 src2w,mlibs32 src2h,
mlibs32 src2x, mlibs32 src2y,
mlibs32 dstlb,mlibs32 src1lb,
mlibs32 src2lb, mlibblend src1blend,
mlibblend src2blend);
void mlibVideoColorBlendABGResetAlpha(mlibu32 *dst,
const mlibu32 *src1,const mlibu32 *src2,
mlibs32 src1w, mlibs32 src1h,
mlibs32 src2w,mlibs32 src2h,
mlibs32 src2x, mlibs32 src2y,
mlibs32 dstlb, mlibs32 src1lb,
mlibs32 src2lb, mlibblend src1blend,
mlibblend src2blend);
DESCRIPTION
The functions use the following equation for blending
images:
dst = (src1 * src1blend) ] (src2 * src2blend)
The two multi-banded source images (src1 and src2) are
blended together and stored in the destination image (dst).
The image buffers pointed to by dst, src1, and src2 contain
4-banded ABGR images, 8 bits per component. src1w and
src1h are the dimensions of the src1 input buffer. src2w
and src2h are the dimensions of the src2 input buffer. The
output buffer must be at least as large as the src1 input
buffer. src2x and src2y are the offset of the src2 input
buffer relative to src1. Where pixels in src2 overlap pixels
in src1, the pixels are blended. Pixels in src1 which are
outside of src2 are copied into dst. Pixels in the dst image
outside of src1 are left unchanged. src1blend specifies the
blend function to be applied to the pixels of src1 image and
src2blend specifies the blend function to be applied to the
pixels of src2.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibVideoColorBlendABGR(3MLIB)
Possible blend functions are:
MLIBLENDZERO
MLIBLENDONE
MLIBLENDSRCALPHA
MLIBLENDONEMINUSRCALPHA
MLIBLENDSTALPHA
MLIBLENDONEMINUSDSTALPHA
MLIBLENDSRCALPHA is the alpha component of image src2
scaled to the range 0.0 to 1.0. MLIBLENDSTALPHA is the
alpha component of image src1 scaled to the range 0.0 to
1.0. All pixel components are treated as unsigned 8-bit
quantities and the output pixel component values are clamped
to the range 0 to 255.
For the mlibVideoColorBlendABGResetAlpha() function, the
alpha value of every pixel in destination image is set to 0
after blending is complete.
PARAMETERS
Each of the functions takes the following arguments:
dst Pointer to output image.
src1 Pointer to 1st input image.
src2 Pointer to 2nd input image.
src1w src1 image width in pixels.
src1h src1 image height in rows.
src2w src2 image width in pixels.
src2h src2 image height in rows.
src2x src2 horizontal displacement (in pixels),
relative to the upper-left corner of src1.
SunOS 5.11 Last change: 2 Mar 2007 2
mediaLib Library Functions mlibVideoColorBlendABGR(3MLIB)
src2y src2 vertical displacement (in rows), relative
to the upper-left corner of src1.
dstlb Linebytes for output image.
src1lb Linebytes for 1st input image.
src2lb Linebytes for 2nd input image.
src1blend Blend function for src1 image.
src2blend Blend function for src2 image.
RETURN VALUES
None.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibVideoColorBlendABGRInp(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 3
|