better cache trace

This commit is contained in:
John Cupitt 2015-04-14 13:18:37 +01:00
parent c1900dccd4
commit e9707bcafd
2 changed files with 11 additions and 5 deletions

View File

@ -1849,9 +1849,9 @@ vips_object_set_argument_from_string( VipsObject *object,
else
access = VIPS_ACCESS_RANDOM;
if( vips_foreign_load( value, &out,
if( !(out = vips_image_new_from_file( value,
"access", access,
NULL ) )
NULL )) )
return( -1 );
g_value_init( &gvalue, VIPS_TYPE_IMAGE );
@ -2073,11 +2073,10 @@ vips_object_get_argument_to_string( VipsObject *object,
if( g_type_is_a( otype, VIPS_TYPE_IMAGE ) ) {
VipsImage *in;
/* Pull out the image and write it.
/* Pull out the image and write it.
*/
g_object_get( object, name, &in, NULL );
if( vips_foreign_save( in, arg, NULL ) ) {
if( vips_image_write_to_file( in, arg, NULL ) ) {
g_object_unref( in );
return( -1 );
}

View File

@ -1358,6 +1358,13 @@ vips_call_argv( VipsOperation *operation, int argc, char **argv )
if( vips_object_build( VIPS_OBJECT( operation ) ) )
return( -1 );
/* We're not using the cache, so we need to print the trace line.
*/
if( vips__cache_trace ) {
printf( "vips cache : " );
vips_object_print_summary( VIPS_OBJECT( operation ) );
}
call.i = 0;
if( vips_argument_map( VIPS_OBJECT( operation ),
vips_call_argv_output, &call, NULL ) )