1mlib_ImageInvert_Inp(3MLIB)mediaLib Library Functionsmlib_ImageInvert_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageInvert_Inp - invert in place
7

SYNOPSIS

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

DESCRIPTION

16       The  mlib_ImageInvert_Inp() function performs the in-place inversion of
17       an image such that white becomes black, light gray becomes  dark  gray,
18       and so on.
19
20
21       It uses the following equation:
22
23         srcdst[x][y][i] = (Gwhite + Gblack) - srcdst[x][y][i]
24
25
26
27       The values of Gwhite and Gblack for different types of images are:
28
29
30
31
32         Image Type         Gwhite          Gblack       Gwhite + Gblack
33       ──────────────────────────────────────────────────────────────────
34       MLIB_BYTE        255              0               255 (0xFF)
35       MLIB_SHORT       32767            -32768          -1 (0xFFFF)
36       ──────────────────────────────────────────────────────────────────
37       MLIB_USHORT      65535            0               65535 (0xFFFF)
38       ──────────────────────────────────────────────────────────────────
39       MLIB_INT         2147483647       -2147483648     -1 (0xFFFFFFFF)
40
41
42
43       Given  that  integer  data  are in the two's complement representation,
44       mlib_ImageInvert() is the same as mlib_ImageNot(), while  mlib_ImageIn‐
45       vert_Inp() is the same as mlib_ImageNot_Inp().
46

PARAMETERS

48       The function takes the following arguments:
49
50       srcdst    Pointer to source and destination image.
51
52

RETURN VALUES

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

ATTRIBUTES

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

SEE ALSO

72       mlib_ImageInvert(3MLIB),   mlib_ImageInvert_Fp(3MLIB),    mlib_ImageIn‐
73       vert_Fp_Inp(3MLIB), attributes(5)
74
75
76
77SunOS 5.11                        2 Mar 2007       mlib_ImageInvert_Inp(3MLIB)
Impressum