1mlib_ImageRotate(3MLIB)   mediaLib Library Functions   mlib_ImageRotate(3MLIB)
2
3
4

NAME

6       mlib_ImageRotate - rotate image
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageRotate(mlib_image *dst, const mlib_image *src,
13            mlib_d64 angle, mlib_d64 xcenter, mlib_d64 ycenter, mlib_filter filter,
14            mlib_edge edge);
15
16

DESCRIPTION

18       The  mlib_ImageRotate()  function rotates a source image around a user-
19       defined rotation center in the user-defined radians.
20
21
22       The width and height of the destination image can be different from the
23       width  and  height of the source image. The (xcenter, ycenter) point of
24       the source image is mapped to the center of the destination image.  You
25       should  ensure  that the destination buffer is large enough to hold the
26       resulting bounding box to avoid clipping part of the image.
27
28
29       The data type of the images can  be  MLIB_BIT,  MLIB_BYTE,  MLIB_SHORT,
30       MLIB_USHORT, or MLIB_INT.
31
32
33       The  center  of  the  upper-left corner pixel of an image is located at
34       (0.5, 0.5).
35

PARAMETERS

37       The function takes the following arguments:
38
39       dst        Pointer to destination image.
40
41
42       src        Pointer to source image.
43
44
45       angle      Angle of rotation. The angle is measured in  radians  clock‐
46                  wise.
47
48
49       xcenter    X coordinate of rotation center in the source image.
50
51
52       ycenter    Y coordinate of rotation center in the source image.
53
54
55       filter     Type of resampling filter. It can be one of the following:
56
57                    MLIB_NEAREST
58                    MLIB_BILINEAR
59                    MLIB_BICUBIC
60                    MLIB_BICUBIC2
61
62
63
64       edge       Type of edge condition. It can be one of the following:
65
66                    MLIB_EDGE_DST_NO_WRITE
67                    MLIB_EDGE_DST_FILL_ZERO
68                    MLIB_EDGE_OP_NEAREST
69                    MLIB_EDGE_SRC_EXTEND
70                    MLIB_EDGE_SRC_PADDED
71
72
73

RETURN VALUES

75       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
76       MLIB_FAILURE.
77

ATTRIBUTES

79       See attributes(5) for descriptions of the following attributes:
80
81
82
83
84       ┌─────────────────────────────┬─────────────────────────────┐
85       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │Interface Stability          │Committed                    │
88       ├─────────────────────────────┼─────────────────────────────┤
89       │MT-Level                     │MT-Safe                      │
90       └─────────────────────────────┴─────────────────────────────┘
91

SEE ALSO

93       mlib_ImageRotate_Fp(3MLIB), mlib_ImageRotateIndex(3MLIB), attributes(5)
94
95
96
97SunOS 5.11                        2 Mar 2007           mlib_ImageRotate(3MLIB)
Impressum