Table of Contents

## Name

im_setupout - set up an image descriptor for WIO output

## Synopsis

#include <vips/vips.h>

int im_setupout(image)
IMAGE *image;

## Description

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.

See `VIPS Library Programmers' Guide,' in the accompanying documentation for a guide to the use of this call --- but 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.

## See Also

im_cp_desc(3) , im_iocheck(3) .

## Copyright

N. Dessipris

## Author

N. Dessipris - 11/04/1990, updated on 22/04/1991

Table of Contents

- Name
- Synopsis
- Description
- Return Value
- SeeAlso
- Copyright
- Author