1mlib_ImageAffineTable(3MLIBm)ediaLib Library Functionmslib_ImageAffineTable(3MLIB)
2
3
4
6 mlib_ImageAffineTable - affine transformation on an image with table-
7 driven interpolation
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 mlib_status mlib_ImageAffineTable(mlib_image *dst, const mlib_image *src,
14 const mlib_d64 *mtx, const void *interp_table, mlib_edge edge);
15
16
18 The mlib_ImageAffineTable() function does affine transformation on an
19 image with table-driven interpolation.
20
21
22 The following equation represents the affine transformation:
23
24 xd = a*xs + b*ys + tx
25 yd = c*xs + d*ys + ty
26
27
28
29 where a point with coordinates (xs, ys) in the source image is mapped
30 to a point with coordinates (xd, yd) in the destination image.
31
32
33 The data type of the images can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT,
34 or MLIB_INT.
35
36
37 The width and height of the destination image can be different from the
38 width and height of the source image.
39
40
41 The center of the upper-left corner pixel of an image is located at
42 (0.5, 0.5).
43
45 The function takes the following arguments:
46
47 dst Pointer to destination image.
48
49
50 src Pointer to source image.
51
52
53 mtx Transformation matrix. mtx[0] holds a; mtx[1] holds b;
54 mtx[2] holds tx; mtx[3] holds c; mtx[4] holds d; mtx[5]
55 holds ty.
56
57
58 interp_table Pointer to an interpolation table. The table is created
59 by the mlib_ImageInterpTableCreate() function.
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_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_ImageInterpTableCreate(3MLIB), mlib_ImageInterpTableDelete(3MLIB),
92 mlib_ImageAffineTable_Fp(3MLIB), mlib_ImageAffine(3MLIB),
93 mlib_ImageAffine_Fp(3MLIB), attributes(5)
94
95
96
97SunOS 5.11 2 Mar 2007 mlib_ImageAffineTable(3MLIB)