diff --git a/TODO b/TODO index cc53f1b9..1c402bba 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,31 @@ +- vips_object_set_property() for output args should expect a pointer to the + location to write the value to on _build() + + nope, won't work + + try 2) init all output VipsImage to a "p" image and output args are never + required ... instead, after _build(), you can read them out with get_prop + and copy them whereever you like + + int im_add( in1, in2, out ) + { + VipsImage *x; + VipsOperation *op; + + if( !(op = vips_call( "add", in1, in2 )) ) + return( -1 ); + x = g_object_get_property( op, "out" ); + if( im_copy( x, out ) ) { + g_object_unref( op ); + return( -1 ); + } + g_object_unref( op ); + + return( 0 ); + } + + + - vips_object_set_argument_from_string() leaks output images, because it has to, does this matter? @@ -9,10 +37,19 @@ vips_call( "add", in1, in2, &out ) - writes output to &out + writes output to a "p" image on &out how would this work for the CLI wrapper + vips7 compat adds another copy: + + int im_add( in1, in2, out ) + { + VipsImage *x; + + return( vips_call( "add", in1, in2, &x ) || + im_copy( x, out ) ); + } diff --git a/libvips/iofuncs/operation.c b/libvips/iofuncs/operation.c index da9e9c45..52e28d5b 100644 --- a/libvips/iofuncs/operation.c +++ b/libvips/iofuncs/operation.c @@ -481,8 +481,11 @@ vips_call_options_add( VipsObject *object, entry[0].arg = G_OPTION_ARG_CALLBACK; entry[0].arg_data = (gpointer) vips_call_options_set; entry[0].description = g_param_spec_get_blurb( pspec ); - entry[0].arg_description = - g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ); + if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) + entry[0].arg_description = NULL; + else + entry[0].arg_description = + g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ); entry[1].long_name = NULL;