void VImage::write_to_file( const char *name, VOption *options ) const { char filename[VIPS_PATH_MAX]; char option_string[VIPS_PATH_MAX]; const char *operation_name; vips__filename_split8( name, filename, option_string ); if( !(operation_name = vips_foreign_find_save( filename )) ) { delete options; throw VError(); } call_option_string( operation_name, option_string, (options ? options : VImage::option())-> set( "in", *this )-> set( "filename", filename ) ); }
VImage VImage::new_from_file( const char *name, VOption *options ) { char filename[VIPS_PATH_MAX]; char option_string[VIPS_PATH_MAX]; const char *operation_name; VImage out; vips__filename_split8( name, filename, option_string ); if( !(operation_name = vips_foreign_find_load( filename )) ) { delete options; throw VError(); } call_option_string( operation_name, option_string, (options ? options : VImage::option())-> set( "filename", filename )-> set( "out", &out ) ); return( out ); }
void VImage::call( const char *operation_name, VOption *options ) { call_option_string( operation_name, NULL, options ); }