1mlib_ImageColorHSV2RGB_Fp(3mMeLdIiBa)Lib Library Funcmtliiobn_sImageColorHSV2RGB_Fp(3MLIB)
2
3
4
6 mlib_ImageColorHSV2RGB_Fp - HSV to RGB color conversion
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageColorHSV2RGB_Fp(mlib_image *dst,
13 const mlib_image *src);
14
15
17 The mlib_ImageColorHSV2RGB_Fp() function performs a conversion from
18 hue/saturation/value to red/green/blue. The source and destination
19 images must be three-channel images.
20
21
22 It uses the following equations:
23
24 P = V*(1 - S)
25 Q = V*(1 - S*fraction(H*6))
26 T = V*(1 - S*(1 - fraction(H*6)))
27
28 R, G, B = V, T, P if 0 ≤ H < 1/6
29 R, G, B = Q, V, P if 1/6 ≤ H < 2/6
30 R, G, B = P, V, T if 2/6 ≤ H < 3/6
31 R, G, B = P, Q, V if 3/6 ≤ H < 4/6
32 R, G, B = T, P, V if 4/6 ≤ H < 5/6
33 R, G, B = V, P, Q if 5/6 ≤ H < 1
34
35
36
37 where 0 ≤ H < 1 and 0 ≤ S, V, P, Q, T, R, G, B ≤ 1.
38
39
40 For MLIB_FLOAT and MLIB_DOUBLE images, the above equations are followed
41 verbatim. Input H component values must be limited to the [0.0, 1.0)
42 range. Input S and V component values must be limited to the [0.0, 1.0]
43 range.
44
46 The function takes the following arguments:
47
48 dst Pointer to destination image.
49
50
51 src Pointer to source image.
52
53
55 The function returns MLIB_SUCCESS if successful. Otherwise it returns
56 MLIB_FAILURE.
57
59 See attributes(5) for descriptions of the following attributes:
60
61
62
63
64 ┌─────────────────────────────┬─────────────────────────────┐
65 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
66 ├─────────────────────────────┼─────────────────────────────┤
67 │Interface Stability │Committed │
68 ├─────────────────────────────┼─────────────────────────────┤
69 │MT-Level │MT-Safe │
70 └─────────────────────────────┴─────────────────────────────┘
71
73 mlib_ImageColorHSV2RGB(3MLIB), mlib_ImageColorRGB2HSV(3MLIB),
74 mlib_ImageColorRGB2HSV_Fp(3MLIB), attributes(5)
75
76
77
78SunOS 5.11 12 Sep 2007 mlib_ImageColorHSV2RGB_Fp(3MLIB)