From 1b5468465057c19282d71f345dfdf163436462fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Szabo?= Date: Fri, 5 Jul 2019 17:29:11 +0200 Subject: [PATCH] Add set and get for an array of ints --- cplusplus/include/vips/VImage8.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cplusplus/include/vips/VImage8.h b/cplusplus/include/vips/VImage8.h index abd0b78a..0c51de82 100644 --- a/cplusplus/include/vips/VImage8.h +++ b/cplusplus/include/vips/VImage8.h @@ -351,6 +351,12 @@ public: vips_image_set_int( this->get_image(), field, value ); } + void + set( const char *field, int *value, int n ) + { + vips_image_set_array_int( this->get_image(), field, value, n ); + } + void set( const char *field, double value ) { @@ -388,6 +394,13 @@ public: return( value ); } + void + get_array_int( const char *field, int **out, int *n ) const + { + if( vips_image_get_array_int( this->get_image(), field, out, n ) ) + throw( VError() ); + } + double get_double( const char *field ) const {