1mlib_ImageZoomTranslateToGrmaeyd(i3aMLLiIbB)LibrarymFluinbc_tIimoangseZoomTranslateToGray(3MLIB)
2
3
4
6 mlib_ImageZoomTranslateToGray - zoom, with translation, and convert to
7 grayscale
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 mlib_status mlib_ImageZoomTranslateToGray(mlib_image *dst,
14 const mlib_image *src, mlib_d64 zoomx, mlib_d64 zoomy,
15 mlib_d64 tx, mlib_d64 ty, mlib_filter filter, mlib_edge edge,
16 const mlib_s32 *ghigh, const mlib_s32 *glow);
17
18
20 The mlib_ImageZoomTranslateToGray() function will enlarge or minify the
21 source binary image by the X and Y zoom factors, with translation, and
22 convert the resulting image into a grayscale image.
23
24
25 It uses the following equation for coordinate mapping:
26
27 xd = zoomx*xs + tx
28 yd = zoomy*ys + ty
29
30
31
32 where a point with coordinates (xs, ys) in the source image is mapped
33 to a point with coordinates (xd, yd) in the destination image.
34
35
36 The width and height of the destination image can be different from the
37 width and height of the source image.
38
39
40 The center of the upper-left corner pixel of an image is located at
41 (0.5, 0.5).
42
44 The function takes the following arguments:
45
46 dst Pointer to destination image. It must be of type MLIB_BYTE
47 and have just one channel.
48
49
50 src Pointer to source image. It must be of type MLIB_BIT and have
51 just one channel.
52
53
54 zoomx X zoom factor. zoomx > 0.
55
56
57 zoomy Y zoom factor. zoomy > 0.
58
59
60 tx X translation.
61
62
63 ty Y translation.
64
65
66 filter Type of resampling filter. It must be MLIB_NEAREST.
67
68
69 edge Type of edge condition. It can be one of the following:
70
71 MLIB_EDGE_DST_NO_WRITE
72 MLIB_EDGE_DST_FILL_ZERO
73 MLIB_EDGE_OP_NEAREST
74 MLIB_EDGE_SRC_EXTEND
75 MLIB_EDGE_SRC_PADDED
76
77
78
79 ghigh Pointer to value for '1' pixels in source image.
80
81
82 glow Pointer to value for '0' pixels in source image.
83
84
86 The function returns MLIB_SUCCESS if successful. Otherwise it returns
87 MLIB_FAILURE.
88
90 See attributes(5) for descriptions of the following attributes:
91
92
93
94
95 ┌─────────────────────────────┬─────────────────────────────┐
96 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
97 ├─────────────────────────────┼─────────────────────────────┤
98 │Interface Stability │Committed │
99 ├─────────────────────────────┼─────────────────────────────┤
100 │MT-Level │MT-Safe │
101 └─────────────────────────────┴─────────────────────────────┘
102
104 mlib_ImageSubsampleBinaryToGray(3MLIB), attributes(5)
105
106
107
108SunOS 5.11 2 Mar 200m7lib_ImageZoomTranslateToGray(3MLIB)