libvips/man/im_iocheck.3
2007-08-31 13:01:42 +00:00

51 lines
1.4 KiB
Groff

.TH IM_IOCHECK 3 "11 April 1990"
.SH NAME
im_incheck, im_outcheck, im_iocheck \- checks image descriptors
for WIO
.SH SYNOPSIS
.B #include <vips.h>
int im_incheck( in )
.br
IMAGE *in;
int im_outcheck( out )
.br
IMAGE *out;
.B int im_iocheck( in, out)
.br
.B IMAGE *in, *out;
.SH DESCRIPTION
im_incheck(3)
checks that an image descriptor is suitable for WIO input (ie. all of
its pels can be found from im\-\>data). If possible, it transforms the
descriptor to make WIO input ok using the following rules:
IM_PARTIAL: the descriptor is magically turned into an IM_SETBUF descriptor.
Memory is allocated and the image generated into that. The old partial
callbacks are closed down, and the descriptor reformed as a IM_SETBUF.
IM_OPENOUT: if the descriptor has been written to, it is automatically
`rewound,` that is, it is closed and reopened as an IM_MMAPIN descriptor.
IM_SETBUF: just checks that the descriptor has been written to.
See the manual page for im_setupout(3) for a skeleton program.
im_outcheck(3) checks that a descriptor is suitable for WIO output with
im_writeline(3). If it sees an IM_PARTIAL image, it turns it magically into an
IM_SETBUF image.
im_iocheck(3) simply calls in_incheck(3) for image in and im_outcheck(3) for
image out.
.SH RETURN VALUE
All functions returns 0 on success and -1 on error.
.SH SEE\ ALSO
im_open(3), im_cp_desc(3), im_setupout(3), im_makerw(3).
.SH COPYRIGHT
National Gallery
.SH AUTHOR
J. Cupitt \- 23/7/93