Table of Contents

Name

im_init_world, im_get_option_group - start up VIPS

Synopsis

#include <vips/vips.h>

int im_init_world( const char *argv0 )
GOptionGroup *im_get_option_group( void );

Description

im_init_world(3) starts up the VIPS library. It:

- initialises any libraries that VIPS is using, including GObject
- starts up the threading system
- guesses where the VIPS data files are and sets up i18n
- loads any plugins

The argv0 argument is the value of argv[0] your program was passed by the host operating system. VIPS uses this with im_guess_prefix(3) to try to find the various VIPS data files.

Example

int
main( int argc, char **argv )
{
if( im_init_world( argv[0] ) )
error_exit( "unable to start VIPS" );

return( 0 );
}

im_get_option_group(3) returns a GOptionGroup containing various VIPS command-line options. It can be used with GOption to help parse argc/argv.

See Also

im_guess_prefix(3) , GOption(3)

Copyright

Birkbeck College and the National Gallery (c) 1994


Table of Contents