argh
This commit is contained in:
parent
dd6f0e8b4d
commit
c4804b6fb3
39
TODO
39
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 ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user