better --vips-progress feedback for dzsave
This commit is contained in:
parent
3797c1824a
commit
150927a27f
18
TODO
18
TODO
@ -1,25 +1,7 @@
|
||||
- fix --vips-progress for dzsave
|
||||
|
||||
_set_progress(FALSE) on an image upstream of the tile isn't going to help,
|
||||
we attach callbacks to all images if --vips-progress is on
|
||||
|
||||
on set_progress(FALSE) vips_sink_disc() should stop calling
|
||||
vips_image_preeval()
|
||||
|
||||
progress reporting should be done by vips.c, not by libvips?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- threadpool recyling might be useful for dzsave?
|
||||
|
||||
|
||||
|
||||
|
||||
- check and fix up docs
|
||||
|
||||
index items should all be links
|
||||
|
@ -1059,6 +1059,7 @@ strip_work( VipsThreadState *state, void *a )
|
||||
printf( "strip_work: writing to %s\n", buf );
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
vips_image_set_int( x, "hide-progress", 1 );
|
||||
if( vips_image_write_to_buffer( x, dz->suffix, &buf, &len, NULL ) ) {
|
||||
g_object_unref( x );
|
||||
return( -1 );
|
||||
|
@ -685,6 +685,9 @@ vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
||||
int tile_height;
|
||||
int nlines;
|
||||
|
||||
if( vips_image_get_typeof( image, "hide-progress" ) )
|
||||
return( 0 );
|
||||
|
||||
*last = -1;
|
||||
|
||||
vips_get_tile_size( image,
|
||||
@ -703,6 +706,9 @@ vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
||||
static int
|
||||
vips_image_eval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
||||
{
|
||||
if( vips_image_get_typeof( image, "hide-progress" ) )
|
||||
return( 0 );
|
||||
|
||||
if( progress->percent != *last ) {
|
||||
printf( _( "%s %s: %d%% complete" ),
|
||||
g_get_prgname(), image->filename,
|
||||
@ -723,6 +729,9 @@ vips_image_eval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
||||
static int
|
||||
vips_image_posteval_cb( VipsImage *image, VipsProgress *progress )
|
||||
{
|
||||
if( vips_image_get_typeof( image, "hide-progress" ) )
|
||||
return( 0 );
|
||||
|
||||
/* Spaces at end help to erase the %complete message we overwrite.
|
||||
*/
|
||||
printf( _( "%s %s: done in %.3gs \n" ),
|
||||
|
Loading…
Reference in New Issue
Block a user