1mlib_ImageResetSubimageStrumcetd(i3aMLLiIbB)LibrarymFluinbc_tIimoangseResetSubimageStruct(3MLIB)
2
3
4
6 mlib_ImageResetSubimageStruct - reset sub-image data structure
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageResetSubimageStruct(mlib_image *subimg,
13 const mlib_image *img, mlib_s32 x, mlib_s32 y,
14 mlib_s32 w, mlib_s32 h);
15
16
18 The mlib_ImageResetSubimageStruct() function resets a sub-image's data
19 structure using parameters supplied by the user.
20
21
22 The mlib_ImageResetSubimageStruct() function returns MLIB_FAILURE if
23 the supplied parameters do not pass the following sanity checks:
24
25 o subimg != NULL
26
27 o img != NULL
28
29 o 0 < w ≤ mlib_ImageGetWidth(img)
30
31 o 0 < h ≤ mlib_ImageGetHeight(img)
32
33 o 0 ≤ x ≤ (mlib_ImageGetWidth(img) - w)
34
35 o 0 ≤ y ≤ (mlib_ImageGetHeight(img) - h)
36
37
38 Whenever MLIB_FAILURE is returned, the original image data structure is
39 not changed.
40
41
42 If mlib_ImageIsUserAllocated(subimg)==0, the original data buffer is
43 freed, otherwise the original data buffer is not freed.
44
46 The function takes the following arguments:
47
48 subimg Pointer to the sub-image data structure.
49
50
51 img Pointer to the source image data structure.
52
53
54 x X coordinate of the left border in the source image.
55
56
57 y Y coordinate of the top border in the source image.
58
59
60 w Width of the sub-image.
61
62
63 h Height of the sub-image.
64
65
67 MLIB_SUCCESS is returned if the image data structure is reset success‐
68 fully. MLIB_FAILURE is returned when the image data structure can not
69 be reset according to the parameters supplied.
70
72 See attributes(5) for descriptions of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Interface Stability │Committed │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │MT-Level │MT-Safe │
83 └─────────────────────────────┴─────────────────────────────┘
84
86 mlib_ImageCreate(3MLIB), mlib_ImageCreateSubimage(3MLIB), mlib_Image‐
87 CreateStruct(3MLIB), mlib_ImageSetStruct(3MLIB), mlib_ImageReset‐
88 Struct(3MLIB), mlib_ImageSetSubimageStruct(3MLIB),
89 mlib_ImageDelete(3MLIB), mlib_ImageSetFormat(3MLIB), mlib_ImageSet‐
90 Paddings(3MLIB), attributes(5)
91
92
93
94SunOS 5.11 10 Sep 20m0l7ib_ImageResetSubimageStruct(3MLIB)