im_setupout3
Set up an image descriptor for wio output
Usage
#include <vips/vips.h>
int im_setupout(image)
IMAGE *image;
Overview
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 );
}
Return value
The function returns 0 on success and -1 on error.
Releases
4 releases since Debian 3.1 (Sarge); the text changed 1 time.