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

52 lines
1.2 KiB
Groff

.TH IM_SETUPOUT 3 "11 April 1990"
.SH NAME
im_setupout \- set up an image descriptor for WIO output
.SH SYNOPSIS
.B #include <vips/vips.h>
.B int im_setupout(image)
.br
.B IMAGE *image;
.SH DESCRIPTION
.B im_setupout(3)
makes a descriptor ready for WIO writing. If the descriptor is a memory
buffer, enough memory is allocated to be able to hold all of the pels of the
image. If the descriptor is an output file, then the header is written to
disc.
Typically, for WIO, you should have
int
im_wombat( in, out )
IMAGE *in, *out;
{
if( im_iocheck( in, out ) )
return( -1 );
... check parameters, check image descriptors
... for type-compatibility, etc. etc.
if( im_cp_desc( out, in ) )
return( -1 );
... set fields in out for the type of image you
... wish to write
if( im_setupout( out ) )
return( -1 );
... process from input to output, reading from in->data
... and writing to out with im_writeline(3)
return( 0 );
}
.SH RETURN VALUE
The function returns 0 on success and -1 on error.
.SH SEE\ ALSO
im_cp_desc(3), im_iocheck(3).
.SH COPYRIGHT
.br
N. Dessipris
.SH AUTHOR
N. Dessipris \- 11/04/1990, updated on 22/04/1991