1mlib_ImageConstDiv(3MLIB) mediaLib Library Functions mlib_ImageConstDiv(3MLIB)
2
3
4

NAME

6       mlib_ImageConstDiv - division into a constant
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageConstDiv(mlib_image *dst, const mlib_image *src,
13            const mlib_d64 *c);
14
15

DESCRIPTION

17       The mlib_ImageConstDiv() function divides each pixel in an image into a
18       constant value on a pixel-by-pixel basis.
19
20
21       It uses the following equation:
22
23         dst[x][y][i] = c[i] / src[x][y][i]
24
25
26
27       In the case of src[x][y][i] = 0,
28
29         dst[x][y][i] = 0              if c[i] = 0
30         dst[x][y][i] = DATA_TYPE_MAX  if c[i] > 0
31         dst[x][y][i] = DATA_TYPE_MIN  if c[i] < 0
32
33
34
35       where DATA_TYPE is MLIB_U8, MLIB_S16,  MLIB_U16,  or  MLIB_S32  for  an
36       image  of type MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, or MLIB_INT, respec‐
37       tively.
38

PARAMETERS

40       The function takes the following arguments:
41
42       dst    Pointer to destination image.
43
44
45       src    Pointer to source image.
46
47
48       c      Constant into which each pixel is  divided.  c[i]  contains  the
49              constant for channel i.
50
51

RETURN VALUES

53       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
54       MLIB_FAILURE.
55

ATTRIBUTES

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

SEE ALSO

71       mlib_ImageConstDiv_Fp(3MLIB),         mlib_ImageConstDiv_Fp_Inp(3MLIB),
72       mlib_ImageConstDiv_Inp(3MLIB),          mlib_ImageConstDivShift(3MLIB),
73       mlib_ImageConstDivShift_Inp(3MLIB), attributes(5)
74
75
76
77SunOS 5.11                        2 Mar 2007         mlib_ImageConstDiv(3MLIB)
Impressum