mediaLib Library Functions mlibImageReplaceColor(3MLIB)
NAME
mlibImageReplaceColor - replace a color in an image
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageReplaceColor(mlibimage *dst, const mlibimage *src,
const mlibs32 *color1, const mlibs32 *color2);
DESCRIPTION
The mlibImageReplaceColor() function copies the source
image to the destination image and replaces the pixels hav-
ing a value of color1 with color2.
It uses the following equation:
dst[x][y] = color2 if src[x][y] == color1
dst[x][y] = src[x][y] if src[x][y] != color1
PARAMETERS
The function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
color1 Array of color components to be replaced.
color2 Array of color components to replace color1.
RETURN VALUES
The function returns MLIBSUCES if successful. Otherwise
it returns MLIBFAILURE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageReplaceColor(3MLIB)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageReplaceColorInp(3MLIB),
mlibImageReplaceColorFp(3MLIB),
mlibImageReplaceColorFpInp(3MLIB),
mlibImageThresh5(3MLIB), mlibImageThresh5Inp(3MLIB),
mlibImageThresh5Fp(3MLIB),
mlibImageThresh5FpInp(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|