1mlib_ImageZoomTranslateTablmee_dFipa(L3iMbLILBi)brarmyliFbu_nIcmtaigoenZsoomTranslateTable_Fp(3MLIB)
2
3
4
6 mlib_ImageZoomTranslateTable_Fp - zoom, with translation, with table-
7 driven interpolation
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 mlib_status mlib_ImageZoomTranslateTable_Fp(mlib_image *dst,
14 const mlib_image *src, mlib_d64 zoomx, mlib_d64 zoomy,
15 mlib_d64 tx, mlib_d64 ty, const void *interp_table,
16 mlib_edge edge);
17
18
20 The mlib_ImageZoomTranslateTable_Fp() function will enlarge or minify
21 the floating-point source image by the X and Y zoom factors, with
22 translation. It uses a table, interp_table, to do interpolation.
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 data type of the images can be MLIB_FLOAT or MLIB_DOUBLE.
37
38
39 The width and height of the destination image can be different from the
40 width and height of the source image.
41
42
43 The center of the upper-left corner pixel of an image is located at
44 (0.5, 0.5).
45
47 The function takes the following arguments:
48
49 dst Pointer to destination image.
50
51
52 src Pointer to source image.
53
54
55 zoomx X zoom factor. zoomx > 0.
56
57
58 zoomy Y zoom factor. zoomy > 0.
59
60
61 tx X translation.
62
63
64 ty Y translation.
65
66
67 interp_table Pointer to an interpolation table. The table is created
68 by the mlib_ImageInterpTableCreate() function.
69
70
71 edge Type of edge condition. It can be one of the following:
72
73 MLIB_EDGE_DST_NO_WRITE
74 MLIB_EDGE_DST_FILL_ZERO
75 MLIB_EDGE_OP_NEAREST
76 MLIB_EDGE_SRC_EXTEND
77 MLIB_EDGE_SRC_EXTEND_INDEF
78 MLIB_EDGE_SRC_PADDED
79
80
81
83 The function returns MLIB_SUCCESS if successful. Otherwise it returns
84 MLIB_FAILURE.
85
87 See attributes(5) for descriptions of the following attributes:
88
89
90
91
92 ┌─────────────────────────────┬─────────────────────────────┐
93 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
94 ├─────────────────────────────┼─────────────────────────────┤
95 │Interface Stability │Committed │
96 ├─────────────────────────────┼─────────────────────────────┤
97 │MT-Level │MT-Safe │
98 └─────────────────────────────┴─────────────────────────────┘
99
101 mlib_ImageInterpTableCreate(3MLIB), mlib_ImageInterpTableDelete(3MLIB),
102 mlib_ImageZoomTranslateTable(3MLIB), mlib_ImageZoomTranslate(3MLIB),
103 mlib_ImageZoomTranslate_Fp(3MLIB), attributes(5)
104
105
106
107SunOS 5.11 2 Mar 2m0l0i7b_ImageZoomTranslateTable_Fp(3MLIB)