<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_SYSTEM(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_system - run a command on an image <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> #include <vips/vips.h> <p> int im_system(im, cmd, out) <br> IMAGE *im; <br> const char *cmd; <br> char **out; <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> <b>im_system()</b> runs a command on an image, returning the command’s output as a string. This string should be freed with <b>im_free()</b> when you’ve finished with it. <p> The command is executed with the <a href='system.3.html'><b>system(3)</b></a> call; the first ’%s’ in the command being substituted for a filename. <p> For example: <p> im_system( im, "vips2dj %s | lpr", &result ) <p> will run the command <a href='vips2dj.1.html'>vips2dj(1)</a> on the image, piping the result to the printer. <p> If the IMAGE is a file on disc, then the filename will be the name of the real file. If the image is in memory, or the result of a computation, then a new file is created in the temporary area called something like "vips_XXXXXX", and that filename given to the command. The file is deleted when the command finishes. <p> The environment variable TMPDIR can be used to set the temporary directory. If it is not set, it defaults to "/tmp". <p> <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='system.3.html'>system(3)</a> , <a href='vips2dj.1.html'>vips2dj(1)</a> <h2><a name='sect5' href='#toc5'>Copyright</a></h2> 2000 The National Gallery and Birkbeck College <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'>See Also</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> </ul> </body> </html>