1IM_IOCHECK(3) Library Functions Manual IM_IOCHECK(3)
2
3
4
6 im_incheck, im_outcheck, im_iocheck - checks image descriptors for WIO
7
9 #include <vips.h>
10
11 int im_incheck( in )
12 IMAGE *in;
13
14 int im_outcheck( out )
15 IMAGE *out;
16
17 int im_iocheck( in, out)
18 IMAGE *in, *out;
19
20
22 im_incheck(3) checks that an image descriptor is suitable for WIO input
23 (ie. all of its pels can be found from im->data). If possible, it
24 transforms the descriptor to make WIO input ok using the following
25 rules:
26
27 IM_PARTIAL: the descriptor is magically turned into an IM_SETBUF
28 descriptor. Memory is allocated and the image generated into that. The
29 old partial callbacks are closed down, and the descriptor reformed as a
30 IM_SETBUF.
31
32 IM_OPENOUT: if the descriptor has been written to, it is automatically
33 `rewound,` that is, it is closed and reopened as an IM_MMAPIN descripâ
34 tor.
35
36 IM_SETBUF: just checks that the descriptor has been written to.
37
38 See the manual page for im_setupout(3) for a skeleton program.
39
40 im_outcheck(3) checks that a descriptor is suitable for WIO output with
41 im_writeline(3). If it sees an IM_PARTIAL image, it turns it magically
42 into an IM_SETBUF image.
43
44 im_iocheck(3) simply calls in_incheck(3) for image in and
45 im_outcheck(3) for image out.
46
48 All functions returns 0 on success and -1 on error.
49
51 im_open(3), im_cp_desc(3), im_setupout(3), im_makerw(3), `VIPS Library
52 Programmers' Guide,' in accompanying documentation.
53
55 National Gallery
56
58 J. Cupitt - 23/7/93
59
60
61
62 11 April 1990 IM_IOCHECK(3)