1mlib_ImageZoomTranslateTablmee(d3iMaLLIiBb)Library Fmulnicbt_iIomnasgeZoomTranslateTable(3MLIB)
2
3
4
6 mlib_ImageZoomTranslateTable - 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(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() function will enlarge or minify the
21 source image by the X and Y zoom factors, with translation. It uses a
22 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_BYTE, MLIB_SHORT, MLIB_USHORT,
37 or MLIB_INT.
38
39
40 The width and height of the destination image can be different from the
41 width and height of the source image.
42
43
44 The center of the upper-left corner pixel of an image is located at
45 (0.5, 0.5).
46
48 The function takes the following arguments:
49
50 dst Pointer to destination image.
51
52
53 src Pointer to source image.
54
55
56 zoomx X zoom factor. zoomx > 0.
57
58
59 zoomy Y zoom factor. zoomy > 0.
60
61
62 tx X translation.
63
64
65 ty Y translation.
66
67
68 interp_table Pointer to an interpolation table. The table is created
69 by the mlib_ImageInterpTableCreate() function.
70
71
72 edge Type of edge condition. It can be one of the following:
73
74 MLIB_EDGE_DST_NO_WRITE
75 MLIB_EDGE_DST_FILL_ZERO
76 MLIB_EDGE_OP_NEAREST
77 MLIB_EDGE_SRC_EXTEND
78 MLIB_EDGE_SRC_EXTEND_INDEF
79 MLIB_EDGE_SRC_PADDED
80
81
82
84 The function returns MLIB_SUCCESS if successful. Otherwise it returns
85 MLIB_FAILURE.
86
88 See attributes(5) for descriptions of the following attributes:
89
90
91
92
93 ┌─────────────────────────────┬─────────────────────────────┐
94 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
95 ├─────────────────────────────┼─────────────────────────────┤
96 │Interface Stability │Committed │
97 ├─────────────────────────────┼─────────────────────────────┤
98 │MT-Level │MT-Safe │
99 └─────────────────────────────┴─────────────────────────────┘
100
102 mlib_ImageInterpTableCreate(3MLIB), mlib_ImageInterpTableDelete(3MLIB),
103 mlib_ImageZoomTranslateTable_Fp(3MLIB), mlib_ImageZoomTranslate(3MLIB),
104 mlib_ImageZoomTranslate_Fp(3MLIB), attributes(5)
105
106
107
108SunOS 5.11 2 Mar 2007mlib_ImageZoomTranslateTable(3MLIB)