fix vips8 CLI

the vips8 CLI needed updating for the new refcount strategy
This commit is contained in:
John Cupitt 2011-06-02 15:53:30 +01:00
parent 35a7515e3f
commit 3fab0cbbd4
3 changed files with 17 additions and 17 deletions

13
TODO
View File

@ -1,12 +1,3 @@
- try
$ vips add babe.jpg babe2.jpg out.v
VIPS:ERROR:object.c:815:vips_object_real_build: assertion failed:
(!object->constructed)
- also VipsFormat ... could this replace vips_image_new_from_string()? or
could we call this from vips_image_new_from_string()?
@ -27,8 +18,6 @@ wrap new API for C++
- matlab write
- Magick:
- do we bundle "convert" in the OS X / win32 builds? if we don't we
@ -50,7 +39,7 @@ wrap new API for C++
- leak check, again
- add MATLAB write
- add matlab write
- need a way to make the vips.1 etc. man pages

View File

@ -391,7 +391,18 @@ vips_image_dispose( GObject *gobject )
static VipsObject *
vips_image_new_from_file_object( const char *string )
{
return( VIPS_OBJECT( vips_image_new_from_file( string ) ) );
VipsImage *image;
/* We mustn't _build() the object here, so we can't just call
* vips_image_new_from_file().
*/
image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) );
g_object_set( image,
"filename", string,
"mode", "r",
NULL );
return( VIPS_OBJECT( image ) );
}
static void

View File

@ -1082,11 +1082,11 @@ vips_object_set_argument_from_string( VipsObject *object,
return( -1 );
g_value_init( &gvalue, G_TYPE_OBJECT );
/* VipsObject is GInitiallyUnowned, so the gvalue now has a
* ref count 1 image.
*/
g_value_set_object( &gvalue, object );
/* The GValue now has a ref, we can drop ours.
*/
g_object_unref( object );
}
else if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) {
gboolean b;