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

NAME

6       im_setupout - set up an image descriptor for WIO output
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_setupout(image)
12       IMAGE *image;
13

DESCRIPTION

15       im_setupout(3)  makes  a  descriptor  ready  for  WIO  writing.  If the
16       descriptor is a memory buffer, enough memory is allocated to be able to
17       hold all of the pels of the image. If the descriptor is an output file,
18       then the header is written to disc.
19
20       See `VIPS Library Programmers' Guide,' in the  accompanying  documenta‐
21       tion  for  a  guide to the use of this call --- but typically, for WIO,
22       you should have
23
24           int
25           im_wombat( in, out )
26           IMAGE *in, *out;
27           {
28               if( im_iocheck( in, out ) )
29                   return( -1 );
30
31               ... check parameters, check image descriptors
32               ... for type-compatibility, etc. etc.
33
34               if( im_cp_desc( out, in ) )
35                   return( -1 );
36
37               ... set fields in out for the type of image you
38               ... wish to write
39
40               if( im_setupout( out ) )
41                   return( -1 );
42
43               ...  process  from  input  to  output,  reading  from  in->data
44            ... and writing to out with im_writeline(3)
45
46               return( 0 );
47           }
48

RETURN VALUE

50       The function returns 0 on success and -1 on error.
51

SEE ALSO

53       im_cp_desc(3), im_iocheck(3).
54
56       N. Dessipris
57

AUTHOR

59       N. Dessipris - 11/04/1990, updated on 22/04/1991
60
61
62
63                                 11 April 1990                  IM_SETUPOUT(3)
Impressum