<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_SETUPOUT(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_setupout - set up an image descriptor for WIO output <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> <b>#include <vips/vips.h></b> <p> <b>int im_setupout(image)</b> <br> <b>IMAGE *image;</b> <h2><a name='sect2' href='#toc2'>Description</a></h2> <a href='im_setupout.3.html'><b>im_setupout(3)</b></a> 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. <p> Typically, for WIO, you <p>should have <p> int<br> im_wombat( in, out )<br> IMAGE *in, *out;<br> {<br> if( im_iocheck( in, out ) )<br> return( -1 );<br> <p> ... check parameters, check image descriptors <br> ... for type-compatibility, etc. etc.<br> <p> if( im_cp_desc( out, in ) )<br> return( -1 );<br> <p> ... set fields in out for the type of image you<br> ... wish to write<br> <p> if( im_setupout( out ) )<br> return( -1 );<br> <p> ... process from input to output, reading from in->data<br> <tt> </tt> <tt> </tt> ... and writing to out with <a href='im_writeline.3.html'>im_writeline(3)</a> <br> <p> return( 0 );<br> }<br> <h2><a name='sect3' href='#toc3'>Return Value</a></h2> The function returns 0 on success and -1 on error. <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_cp_desc.3.html'>im_cp_desc(3)</a> , <a href='im_iocheck.3.html'>im_iocheck(3)</a> . <h2><a name='sect5' href='#toc5'>Copyright</a></h2> <br> N. Dessipris <h2><a name='sect6' href='#toc6'>Author</a></h2> N. Dessipris - 11/04/1990, updated on 22/04/1991 <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Return Value</a></li> <li><a name='toc4' href='#sect4'>SeeAlso</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> <li><a name='toc6' href='#sect6'>Author</a></li> </ul> </body> </html>