im_init_world(3)

im_init_world3

Start up vips

Usage

#include <vips/vips.h>

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

Overview

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 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.

Examples

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.

Releases

2 releases since Debian 5.0 (Lenny); the text changed 1 time.

  1. 5.0
  2. 6.0

From libvips-dev 7.20.7-1+b3 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.