1mlib_ImageZoomBlend(3MLIB)mediaLib Library Functionsmlib_ImageZoomBlend(3MLIB)
2
3
4
6 mlib_ImageZoomBlend - image scaling with alpha blending
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageZoomBlend(mlib_image *dst, const mlib_image *src,
13 mlib_d64 zoomx, mlib_d64 zoomy, mlib_filter filter, mlib_edge edge,
14 mlib_blend blend, mlib_s32 alpha, mlib_s32 cmask);
15
16
18 The mlib_ImageZoomBlend() function will enlarge or minify the source
19 image by the X and Y zoom factors and blend it with the destination
20 image.
21
22
23 This function is a special case of mlib_ImageZoomTranslateBlend() with
24 the center of the source image being mapped to the center of the desti‐
25 nation image.
26
27
28 The center of the upper-left corner pixel of an image is considered to
29 be located at (0.5, 0.5).
30
31
32 Both src and dst must be of type MLIB_BYTE. They can have either 3 or 4
33 channels.
34
35
36 The src image cannot have width or height larger than 32767.
37
39 The function takes the following arguments:
40
41 dst Pointer to destination image.
42
43
44 src Pointer to first source image.
45
46
47 zoomx X zoom factor. zoomx > 0.0.
48
49
50 zoomy Y zoom factor. zoomy > 0.0.
51
52
53 filter Type of resampling filter. It can be one of the following:
54
55 MLIB_NEAREST
56 MLIB_BILINEAR
57 MLIB_BICUBIC
58 MLIB_BICUBIC2
59
60
61
62 edge Type of edge condition. It can be one of the following:
63
64 MLIB_EDGE_DST_NO_WRITE
65 MLIB_EDGE_DST_FILL_ZERO
66 MLIB_EDGE_OP_NEAREST
67 MLIB_EDGE_SRC_EXTEND
68 MLIB_EDGE_SRC_EXTEND_INDEF
69 MLIB_EDGE_SRC_PADDED
70
71
72
73 blend Type of alpha blending. It can be one of the following:
74
75 MLIB_BLEND_GTK_SRC
76 MLIB_BLEND_GTK_SRC_OVER
77 MLIB_BLEND_GTK_SRC_OVER2
78
79
80
81 alpha Overall alpha for blending.
82
83
84 cmask Channel mask to indicate the alpha channel.
85
86
88 The function returns MLIB_SUCCESS if successful. Otherwise it returns
89 MLIB_FAILURE.
90
92 See attributes(5) for descriptions of the following attributes:
93
94
95
96
97 ┌─────────────────────────────┬─────────────────────────────┐
98 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
99 ├─────────────────────────────┼─────────────────────────────┤
100 │Interface Stability │Committed │
101 ├─────────────────────────────┼─────────────────────────────┤
102 │MT-Level │MT-Safe │
103 └─────────────────────────────┴─────────────────────────────┘
104
106 mlib_ImageZoomTranslateBlend(3MLIB), mlib_ImageZoomTranslateTable‐
107 Blend(3MLIB), attributes(5)
108
109
110
111SunOS 5.11 2 Mar 2007 mlib_ImageZoomBlend(3MLIB)