1mlib_ImageScale2_Inp(3MLIB)mediaLib Library Functionsmlib_ImageScale2_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageScale2_Inp - linear scaling, in place
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageScale2_Inp(mlib_image *srcdst, const mlib_d64 *alpha,
13            const mlib_d64 *beta);
14
15

DESCRIPTION

17       The mlib_ImageScale2_Inp() function performs an in-place linear scaling
18       on the pixels of the source image by multiplying the data  by  a  scale
19       factor  and  then adding an offset. Images can have 1, 2, 3, or 4 chan‐
20       nels.
21
22
23       The following equation is used:
24
25         srcdst[x][y][i] = srcdst[x][y][i] * alpha[i] + beta[i]
26
27
28
29       If the result of the operation underflows/overflows the minimum/maximum
30       value  supported  by  the destination image, then it will be clamped to
31       the minimum/maximum value respectively.
32
33
34       The  image  can  be  of  type  MLIB_BYTE,  MLIB_SHORT,  MLIB_USHORT  or
35       MLIB_INT.
36

PARAMETERS

38       The function takes the following arguments:
39
40       srcdst    Pointer to source and destination image.
41
42
43       alpha     Scaling  factor.  alpha[i]  contains  the  scaling factor for
44                 channel i.
45
46
47       beta      Offset value. beta[i] contains the offset for channel i.
48
49

RETURN VALUES

51       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
52       MLIB_FAILURE.
53

ATTRIBUTES

55       See attributes(5) for descriptions of the following attributes:
56
57
58
59
60       ┌─────────────────────────────┬─────────────────────────────┐
61       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
62       ├─────────────────────────────┼─────────────────────────────┤
63       │Interface Stability          │Committed                    │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │MT-Level                     │MT-Safe                      │
66       └─────────────────────────────┴─────────────────────────────┘
67

SEE ALSO

69       mlib_ImageScale(3MLIB),                      mlib_ImageScale_Fp(3MLIB),
70       mlib_ImageScale_Fp_Inp(3MLIB),              mlib_ImageScale_Inp(3MLIB),
71       mlib_ImageScale2(3MLIB), attributes(5)
72
73
74
75SunOS 5.11                        2 Mar 2007       mlib_ImageScale2_Inp(3MLIB)
Impressum