This commit is contained in:
John Cupitt 2011-10-20 14:56:13 +01:00
parent 5ad2861b30
commit 02d8f0925f
4 changed files with 34 additions and 3 deletions

View File

@ -21,6 +21,7 @@
- added --vips-leak flag - added --vips-leak flag
- more VipsImage props - more VipsImage props
- added vips_image_write(), old one becomes vips_image_write_to_file() - added vips_image_write(), old one becomes vips_image_write_to_file()
- added vips_region_paint_pel()
12/10/11 started 7.26.6 12/10/11 started 7.26.6
- NOCACHE was not being set correctly on OS X causing performance - NOCACHE was not being set correctly on OS X causing performance

19
TODO
View File

@ -1,3 +1,16 @@
- we have VIPS_ARG_ARRAY, but really we need to say it's an array of double
can we derive from G_TYPE_ARRAY and make G_TYPE_ARRAY_DOUBLE?
no, we have to make a fresh boxed type
maybe make a boxed type which is a GArray plus a GType for array members?
then we could have array of double
add to header.c
- we have this is many places: - we have this is many places:
if( vips_image_copy_fieldsv( conversion->output, if( vips_image_copy_fieldsv( conversion->output,
@ -6,7 +19,9 @@
vips_demand_hint( conversion->output, vips_demand_hint( conversion->output,
VIPS_DEMAND_STYLE_THINSTRIP, insert->main, insert->sub, NULL ); VIPS_DEMAND_STYLE_THINSTRIP, insert->main, insert->sub, NULL );
can we combine these into a single API call? why not combine these into a single API call?
use array version in several places
@ -17,6 +32,8 @@
*join needs insert too *join needs insert too
insert* needs clip, lintra_vec

View File

@ -120,7 +120,7 @@ typedef struct _VipsInsert {
int x; int x;
int y; int y;
gboolean expand; gboolean expand;
double *background; GArray *background;
/* Pixel we paint calculated from background. /* Pixel we paint calculated from background.
*/ */
@ -418,7 +418,7 @@ vips_insert_class_init( VipsInsertClass *class )
G_STRUCT_OFFSET( VipsInsert, expand ), G_STRUCT_OFFSET( VipsInsert, expand ),
FALSE ); FALSE );
VIPS_ARG_DOUBLEVEC( class, "background", 5, VIPS_ARG_ARRAY( class, "background", 5,
_( "Background" ), _( "Background" ),
_( "Colour for new pixels" ), _( "Colour for new pixels" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,

View File

@ -146,6 +146,19 @@ extern int _vips__argument_id;
pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \
} }
#define VIPS_ARG_ARRAY( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \
MIN, MAX, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_boxed( (NAME), (LONG), (DESC), \
G_TYPE_ARRAY, \
G_PARAM_READWRITE );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
_vips__argument_id++, pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_INT( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \ #define VIPS_ARG_INT( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \
MIN, MAX, VALUE ) { \ MIN, MAX, VALUE ) { \
GParamSpec *pspec; \ GParamSpec *pspec; \