mirror of
https://github.com/lovell/sharp.git
synced 2025-07-13 20:30:14 +02:00
Add missing file from commit fc233ed
This commit is contained in:
parent
929ea10f76
commit
1be424cd47
@ -205,6 +205,30 @@ VOption::set( const char *name, std::vector<double> value )
|
||||
return( this );
|
||||
}
|
||||
|
||||
// input int array
|
||||
VOption *
|
||||
VOption::set( const char *name, std::vector<int> value )
|
||||
{
|
||||
Pair *pair = new Pair( name );
|
||||
|
||||
int *array;
|
||||
unsigned int i;
|
||||
|
||||
pair->input = true;
|
||||
|
||||
g_value_init( &pair->value, VIPS_TYPE_ARRAY_INT );
|
||||
vips_value_set_array_int( &pair->value, NULL,
|
||||
static_cast< int >( value.size() ) );
|
||||
array = vips_value_get_array_int( &pair->value, NULL );
|
||||
|
||||
for( i = 0; i < value.size(); i++ )
|
||||
array[i] = value[i];
|
||||
|
||||
options.push_back( pair );
|
||||
|
||||
return( this );
|
||||
}
|
||||
|
||||
// input image array
|
||||
VOption *
|
||||
VOption::set( const char *name, std::vector<VImage> value )
|
||||
@ -465,8 +489,7 @@ VImage::call_option_string( const char *operation_name,
|
||||
operation_name );
|
||||
|
||||
if( !(operation = vips_operation_new( operation_name )) ) {
|
||||
if( options )
|
||||
delete options;
|
||||
delete options;
|
||||
throw( VError() );
|
||||
}
|
||||
|
||||
@ -671,6 +694,17 @@ VImage::bandjoin( VImage other, VOption *options )
|
||||
return( bandjoin( vec, options ) );
|
||||
}
|
||||
|
||||
VImage
|
||||
VImage::composite( VImage other, VipsBlendMode mode, VOption *options )
|
||||
{
|
||||
VImage v[2] = { *this, other };
|
||||
std::vector<VImage> ivec( v, v + VIPS_NUMBER( v ) );
|
||||
int m[1] = { static_cast<int>( mode ) };
|
||||
std::vector<int> mvec( m, m + VIPS_NUMBER( m ) );
|
||||
|
||||
return( composite( ivec, mvec, options ) );
|
||||
}
|
||||
|
||||
std::complex<double>
|
||||
VImage::minpos( VOption *options )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user