TODO updates

This commit is contained in:
John Cupitt 2011-05-25 14:06:23 +01:00
parent cba1ea0024
commit 47a3bd6689
2 changed files with 49 additions and 13 deletions

59
TODO
View File

@ -1,20 +1,10 @@
- also VipsFormat ... could this replace vips_image_new_from_string()? or
could we call this from vips_image_new_from_string()?
at the moment, VipsFormat subclasses never get made, we just use the classes
... we'd need to start making real vipsformat objects for this to work
- use this system to do file format options, eg.
vips copy fred.v fred.jpg{quality=90}
need to keep the old arg parser for compat
how do we get the new one called? will each writer need to test for a ':'
char?
how much effort would this be to change?
@ -24,6 +14,49 @@
what would the API look like?
VipsImage *
thing( VipsImage *in1, VipsImage *in2 )
{
VipsImage *t;
VipsImage *out;
if( vips_add( in1, in2, &t, NULL ) )
return( NULL );
if( vips_add( in1, t, &out, NULL ) ) {
g_object_unref( t );
return( NULL );
}
g_object_unref( t );
return( out );
}
yuk! how can we simplify this? keep refs in an array?
VipsImage *
thing( VipsImage *in1, VipsImage *in2 )
{
VipsImage *t[5] = { NULL };
VipsImage *out;
if( vips_add( in1, in2, &t[0], NULL ) ||
vips_add( in1, t[0], &out, NULL ) ) {
vips_unref_array( t, 5 );
return( NULL );
}
vips_unref_array( t, 5 );
return( out );
}
vips_unref_array() just unrefs all non-NULL pointers in the array
- try out:

View File

@ -317,6 +317,9 @@ vips_format_class_init( VipsFormatClass *class )
VipsObjectClass *object_class = (VipsObjectClass *) class;
object_class->print_class = vips_format_print_class;
object_class->print_class = vips_format_print_class;
}
static void