mediaLib Library Functions mlibImageScale2Inp(3MLIB)
NAME
mlibImageScale2Inp - linear scaling, in place
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageScale2Inp(mlibimage *srcdst, const mlibd64 *alpha,
const mlibd64 *beta);
DESCRIPTION
The mlibImageScale2Inp() function performs an in-place
linear scaling on the pixels of the source image by multi-
plying the data by a scale factor and then adding an offset.
Images can have 1, 2, 3, or 4 channels.
The following equation is used:
srcdst[x][y][i] = srcdst[x][y][i] * alpha[i] ] beta[i]
If the result of the operation underflows/overflows the
minimum/maximum value supported by the destination image,
then it will be clamped to the minimum/maximum value respec-
tively.
The image can be of type MLIBYTE, MLIBSHORT, MLIBUSHORT
or MLIBINT.
PARAMETERS
The function takes the following arguments:
srcdst Pointer to source and destination image.
alpha Scaling factor. alpha[i] contains the scaling fac-
tor for channel i.
beta Offset value. beta[i] contains the offset for
channel i.
RETURN VALUES
The function returns MLIBSUCES if successful. Otherwise
it returns MLIBFAILURE.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageScale2Inp(3MLIB)
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageScale(3MLIB), mlibImageScaleFp(3MLIB),
mlibImageScaleFpInp(3MLIB), mlibImageScaleInp(3MLIB),
mlibImageScale2(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|