1mlib_ImageConstDiv_Inp(3MLImBe)diaLib Library Functiomnlsib_ImageConstDiv_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageConstDiv_Inp - division into a constant
7

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

RETURN VALUES

49       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
50       MLIB_FAILURE.
51

ATTRIBUTES

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

SEE ALSO

67       mlib_ImageConstDiv(3MLIB), mlib_ImageConstDiv_Fp(3MLIB), mlib_ImageCon‐
68       stDiv_Fp_Inp(3MLIB), mlib_ImageConstDivShift(3MLIB), mlib_ImageConstDi‐
69       vShift_Inp(3MLIB), attributes(5)
70
71
72
73SunOS 5.11                        2 Mar 2007     mlib_ImageConstDiv_Inp(3MLIB)
Impressum