This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 2c010bf3f32376abf437e23b4edf4735adb1f957 (commit) from 024061fd56190b6434c9b74a25a19374ca4c02c8 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/2c010bf3f32376abf437e23b4edf4735adb1f...
commit 2c010bf3f32376abf437e23b4edf4735adb1f957 Author: Cyril Hrubis metan@ucw.cz Date: Mon Nov 14 00:28:38 2011 +0100
grinder: Add progress callback for image loading too.
diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c index 0122417..858b2a6 100644 --- a/demos/grinder/grinder.c +++ b/demos/grinder/grinder.c @@ -35,7 +35,7 @@ static const char *progress_prefix = NULL;
static int show_progress(GP_ProgressCallback *self) { - fprintf(stderr, "rFilter %s %3.2f%%", + fprintf(stderr, "r%s %3.2f%%", progress_prefix, self->percentage); return 0; @@ -502,8 +502,11 @@ static void apply_filters(GP_Context **src) GP_RetCode ret;
for (i = 0; i < filter_cnt; i++) { - - progress_prefix = filters[i]->name; + char buf[255]; + + snprintf(buf, sizeof(buf), "Filter %s", filters[i]->name); + + progress_prefix = buf;
if ((ret = filters[i]->apply(src, filter_params[i]))) { fprintf(stderr, "Error: %sn", GP_RetCodeName(ret)); @@ -606,11 +609,16 @@ int main(int argc, char *argv[]) snprintf(buf, sizeof(buf), "out_%i.ppm", i - optind + 1); fprintf(stderr, "Processing '%s' -> '%s'n", argv[i], buf);
- if ((ret = GP_LoadImage(argv[i], &bitmap, NULL))) { + progress_prefix = "Loading image"; + + if ((ret = GP_LoadImage(argv[i], &bitmap, progress_callback))) { fprintf(stderr, "Failed to load bitmap: %sn", GP_RetCodeName(ret)); return 1; } + + if (progress_callback != NULL) + fprintf(stderr, " donen");
apply_filters(&bitmap);
-----------------------------------------------------------------------
Summary of changes: demos/grinder/grinder.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.