int im_init_world( const char *argv0 )
GOptionGroup *im_get_option_group( void );
- 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 from libdir/vips-x.x
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.
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.