1mlib_ImageZoom(3MLIB) mediaLib Library Functions mlib_ImageZoom(3MLIB)
2
3
4
6 mlib_ImageZoom - zoom
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageZoom(mlib_image *dst, const mlib_image *src,
13 mlib_d64 zoomx, mlib_d64 zoomy, mlib_filter filter, mlib_edge edge);
14
15
17 The mlib_ImageZoom() function will enlarge or minify the source image
18 by the X and Y zoom factors. It uses the interpolation method as
19 described by the resampling filter.
20
21
22 The data type of the images can be MLIB_BIT, MLIB_BYTE, MLIB_SHORT,
23 MLIB_USHORT, or MLIB_INT.
24
25
26 The center of the upper-left corner pixel of an image is located at
27 (0.5, 0.5).
28
29
30 The width and height of the destination image can be different from
31 those of the source image.
32
33
34 The center of the source image is mapped onto the center of the desti‐
35 nation image.
36
38 The function takes the following arguments:
39
40 dst Pointer to destination image.
41
42
43 src Pointer to source image.
44
45
46 zoomx X zoom factor. zoomx > 0.0.
47
48
49 zoomy Y zoom factor. zoomy > 0.0.
50
51
52 filter Type of resampling filter. It can be one of the following:
53
54 MLIB_NEAREST
55 MLIB_BILINEAR
56 MLIB_BICUBIC
57 MLIB_BICUBIC2
58
59
60
61 edge Type of edge condition. It can be one of the following:
62
63 MLIB_EDGE_DST_NO_WRITE
64 MLIB_EDGE_DST_FILL_ZERO
65 MLIB_EDGE_OP_NEAREST
66 MLIB_EDGE_SRC_EXTEND
67 MLIB_EDGE_SRC_EXTEND_INDEF
68 MLIB_EDGE_SRC_PADDED
69
70
71
73 The function returns MLIB_SUCCESS if successful. Otherwise it returns
74 MLIB_FAILURE.
75
77 See attributes(5) for descriptions of the following attributes:
78
79
80
81
82 ┌─────────────────────────────┬─────────────────────────────┐
83 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
84 ├─────────────────────────────┼─────────────────────────────┤
85 │Interface Stability │Committed │
86 ├─────────────────────────────┼─────────────────────────────┤
87 │MT-Level │MT-Safe │
88 └─────────────────────────────┴─────────────────────────────┘
89
91 mlib_ImageZoom_Fp(3MLIB), mlib_ImageZoomIn2X(3MLIB), mlib_Image‐
92 ZoomIn2X_Fp(3MLIB), mlib_ImageZoomIn2XIndex(3MLIB), mlib_ImageZoomIn‐
93 dex(3MLIB), mlib_ImageZoomOut2X(3MLIB), mlib_ImageZoomOut2X_Fp(3MLIB),
94 mlib_ImageZoomOut2XIndex(3MLIB), attributes(5)
95
96
97
98SunOS 5.11 2 Mar 2007 mlib_ImageZoom(3MLIB)