use vips_foreign_save_buffer()

so dzsave now knows about save options
This commit is contained in:
John Cupitt 2014-04-24 21:58:08 +01:00
parent 6ab49a9af3
commit 89db89b9ba

View File

@ -1021,7 +1021,7 @@ strip_work( VipsThreadState *state, void *a )
printf( "strip_work: writing to %s\n", buf );
#endif /*DEBUG_VERBOSE*/
if( vips_jpegsave_buffer( x, &buf, &len, NULL ) ) {
if( vips_foreign_save_buffer( x, dz->suffix, &buf, &len, NULL ) ) {
g_object_unref( x );
return( -1 );
}
@ -1042,14 +1042,6 @@ strip_work( VipsThreadState *state, void *a )
g_free( buf );
/*
if( vips_image_write_to_file( x, buf ) ) {
g_object_unref( x );
return( -1 );
}
g_object_unref( x );
*/
#ifdef DEBUG_VERBOSE
printf( "strip_work: success\n" );
#endif /*DEBUG_VERBOSE*/