Skip to content

Commit 1b54684

Browse files
committed
Add set and get for an array of ints
1 parent bd9c97f commit 1b54684

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cplusplus/include/vips/VImage8.h

+13
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ class VImage : VObject
351351
vips_image_set_int( this->get_image(), field, value );
352352
}
353353

354+
void
355+
set( const char *field, int *value, int n )
356+
{
357+
vips_image_set_array_int( this->get_image(), field, value, n );
358+
}
359+
354360
void
355361
set( const char *field, double value )
356362
{
@@ -388,6 +394,13 @@ class VImage : VObject
388394
return( value );
389395
}
390396

397+
void
398+
get_array_int( const char *field, int **out, int *n ) const
399+
{
400+
if( vips_image_get_array_int( this->get_image(), field, out, n ) )
401+
throw( VError() );
402+
}
403+
391404
double
392405
get_double( const char *field ) const
393406
{

0 commit comments

Comments
 (0)