From 444887e57f9508e0b235b165310d7a41f1424f8e Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 2 Feb 2011 12:52:54 +0000 Subject: [PATCH] more informative progress messages --vips-progress now tells you nthreads, tile size and nlines. For example: $ vips --vips-progress im_shrink big.v x.v 8 8 vips x.v: 2 threads, 2858 x 1 tiles, groups of 4 scanlines vips x.v: done in 43s $ --- ChangeLog | 1 + TODO | 1 - libvips/iofuncs/im_open.c | 11 +++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 676dbeb3..a96b1557 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ - add im_sines() to operation db - move im_spatres() to almostdeprecated - done gtk-doc for other +- --vips-progress tells you about nthreads, tile size, nlines 30/11/10 started 7.24.0 - bump for new stable diff --git a/TODO b/TODO index e1dbb060..7d56d015 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ - - use |_O_TEMPORARY to open()'s mode on Windows for tmpfiles to increase the chances we actually delete diff --git a/libvips/iofuncs/im_open.c b/libvips/iofuncs/im_open.c index ace1fa41..786df366 100644 --- a/libvips/iofuncs/im_open.c +++ b/libvips/iofuncs/im_open.c @@ -455,8 +455,19 @@ typedef struct { int evalstart_cb( Progress *progress ) { + int tile_width; + int tile_height; + int nlines; + progress->last_percent = 0; + vips_get_tile_size( progress->im, &tile_width, &tile_height, &nlines ); + printf( _( "%s %s: %d threads, %d x %d tiles, groups of %d scanlines" ), + g_get_prgname(), progress->im->filename, + im_concurrency_get(), + tile_width, tile_height, nlines ); + printf( "\n" ); + return( 0 ); }