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.
       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
                                 11 April 1990