1IM_SYSTEM(3)               Library Functions Manual               IM_SYSTEM(3)
2
3
4

NAME

6       im_system - run a command on an image
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_system(im, cmd, out)
12       IMAGE *im;
13       const char *cmd;
14       char **out;
15
16

DESCRIPTION

18       im_system()  runs a command on an image, returning the command's output
19       as a string. This string should be freed  with  im_free()  when  you've
20       finished with it.
21
22       The  command is executed with the system(3) call; the first '%s' in the
23       command being substituted for a filename.
24
25       For example:
26
27       im_system( im, "vips2dj %s | lpr", &result )
28
29       will run the command vips2dj(1) on the image, piping the result to  the
30       printer.
31
32       If  the  IMAGE is a file on disc, then the filename will be the name of
33       the real file. If the image is in memory, or the result of  a  computa‐
34       tion, then a new file is created in the temporary area called something
35       like "vips_XXXXXX", and that filename given to the command. The file is
36       deleted when the command finishes.
37
38       The environment variable TMPDIR can be used to set the temporary direc‐
39       tory. If it is not set, it defaults to "/tmp".
40
41

RETURN VALUE

43       The function returns 0 on success and -1 on error.
44

SEE ALSO

46       system(3), vips2dj(1)
47
49       2000 The National Gallery and Birkbeck College
50
51
52
53                                  7 Mar 2000                      IM_SYSTEM(3)
Impressum