1mlib_ImageCopySubimage(3MLImBe)diaLib Library Functiomnlsib_ImageCopySubimage(3MLIB)
2
3
4
6 mlib_ImageCopySubimage - copy subimage
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageCopySubimage(mlib_image *dst, const mlib_image *src,
13 mlib_s32 xd, mlib_s32 yd, mlib_s32 xs, mlib_s32 ys, mlib_s32 w,
14 mlib_s32 h);
15
16
18 The mlib_ImageCopySubimage() function copies a specified rectangular
19 area from one image to a specified area of another image. The data type
20 of the images can be MLIB_BIT, MLIB_BYTE, MLIB_SHORT, MLIB_USHORT,
21 MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE.
22
23
24 It uses the following equation:
25
26 dst[xd+i][yd+j][i] = src[xs+i][ys+j][i]
27
28
29
30 where i = 0, 1, ..., w-1; j = 0, 1, ..., h-1.
31
33 The function takes the following arguments:
34
35 dst Pointer to destination image.
36
37
38 src Pointer to source image.
39
40
41 xd X coordinate of the area origin in the destination.
42
43
44 yd Y coordinate of the area origin in the destination.
45
46
47 xs X coordinate of the area origin in the source.
48
49
50 ys Y coordinate of the area origin in the source.
51
52
53 w Width of the area to be copied.
54
55
56 h Height of the area to be copied.
57
58
60 The function returns MLIB_SUCCESS if successful. Otherwise it returns
61 MLIB_FAILURE.
62
64 See attributes(5) for descriptions of the following attributes:
65
66
67
68
69 ┌─────────────────────────────┬─────────────────────────────┐
70 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │Interface Stability │Committed │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │MT-Level │MT-Safe │
75 └─────────────────────────────┴─────────────────────────────┘
76
78 mlib_ImageCopy(3MLIB), mlib_ImageCopyArea(3MLIB), mlib_ImageCopy‐
79 Mask(3MLIB), mlib_ImageCopyMask_Fp(3MLIB), attributes(5)
80
81
82
83SunOS 5.11 2 Mar 2007 mlib_ImageCopySubimage(3MLIB)