mlib_VideoColorBlendABGR_ImediaLib)Library mlib_VideoColorBlendABGR_Inp(3MLIB)NAME
mlib_VideoColorBlendABGR_Inp, mlib_VideoColorBlendABGR_ResetAlpha_Inp -
in-place image blend
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
void mlib_VideoColorBlendABGR_Inp(mlib_u32 *src1dst,
const mlib_u32 *src2,mlib_s32 src1dst_w,
mlib_s32 src1dst_h,mlib_s32 src2_w,
mlib_s32 src2_h,mlib_s32 src2_x,
mlib_s32 src2_y,mlib_s32 src1dst_lb,
mlib_s32 src2_lb,mlib_blend src1dst_blend,
mlib_blend src2_blend);
void mlib_VideoColorBlendABGR_ResetAlpha_Inp(mlib_u32 *src1dst,
const mlib_u32 *src2, mlib_s32 src1dst_w,
mlib_s32 src1dst_h, mlib_s32 src2_w,
mlib_s32 src2_h, mlib_s32 src2_x,
mlib_s32 src2_y, mlib_s32 src1dst_lb,
mlib_s32 src2_lb, mlib_blend src1dst_blend,
mlib_blend src2_blend);
DESCRIPTION
The functions use the following equation for blending images:
src1dst = (src1dst * src1dst_blend) + (src2 * src2_blend)
The two multi-banded source images (src1dst and src2) are blended
together and the result is stored in src1dst. src1dst_blend specifies
the blend function to be applied to the src1dst image and src2_blend
specifies the blend function to be applied to the src2 image. src2_x
and src2_y specify position of src2 relative to the upper-left corner
of src1dst. src2 is clipped to the boundaries of src1dst, if needed.
Possible blend functions are:
MLIB_BLEND_ZERO
MLIB_BLEND_ONE
MLIB_BLEND_SRC_ALPHA
MLIB_BLEND_ONE_MINUS_SRC_ALPHA
MLIB_BLEND_DST_ALPHA
MLIB_BLEND_ONE_MINUS_DST_ALPHA
MLIB_BLEND_DST_ALPHA is the alpha band of image src1 scaled to the
range 0 to 1. MLIB_BLEND_SRC_ALPHA is the alpha band of image src2
scaled to the range 0 to 1. The output pixel bands are clamped to the
range 0 to 255.
For the mlib_VideoColorBlendABGR_ResetAlpha_Inp() 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:
src1dst Pointer to 1st input image (also dest. image).
src2 Pointer to 2nd input image.
src1dst_w src1dst image width in pixels.
src1dst_h src1dst image height in rows.
src2_w src2 image width in pixels.
src2_h src2 image height in rows.
src2_x src2 horizontal displacement (in pixels), relative to
the upper-left corner of src1dst.
src2_y src2 vertical displacement (in rows), relative to the
upper-left corner of src1dst.
src1dst_lb Linebytes for src1dst image.
src2_lb Linebytes for src2 image.
src1dst_blend Blend function for src1dst image.
src2_blend Blend function for src2 image.
RETURN VALUES
None.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
┌─────────────────────────────┬─────────────────────────────┐
│ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
├─────────────────────────────┼─────────────────────────────┤
│Interface Stability │Committed │
├─────────────────────────────┼─────────────────────────────┤
│MT-Level │MT-Safe │
└─────────────────────────────┴─────────────────────────────┘
SEE ALSOmlib_VideoColorBlendABGR(3MLIB), attributes(5)SunOS 5.10 2 Mar 200mlib_VideoColorBlendABGR_Inp(3MLIB)