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 30ca8e94204a8e1d24346bedc088197b0e877846 (commit) via 8fd80e09adcbee684f691159ea96bb852c5d17a8 (commit) from b2930cfac623e072342fd297ad3b82e28e2aba83 (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/30ca8e94204a8e1d24346bedc088197b0e877...
commit 30ca8e94204a8e1d24346bedc088197b0e877846 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 19 15:35:35 2012 +0100
demos: fbshow add resampling option, SDL backend is default.
diff --git a/demos/fbshow/fbshow.c b/demos/fbshow/fbshow.c index 83bed96..7fe0e36 100644 --- a/demos/fbshow/fbshow.c +++ b/demos/fbshow/fbshow.c @@ -22,7 +22,7 @@
/*
- Simple framebuffer image viewer. + Simple image viewer.
*/
@@ -47,6 +47,7 @@ static GP_Context *context = NULL; static int abort_flag = 0; static int rotate = 0; static int show_progress = 0; +static int resampling_method = GP_INTERP_LINEAR_LF_INT;
static int image_loader_callback(GP_ProgressCallback *self) { @@ -166,17 +167,20 @@ static void *image_loader(void *ptr) GP_Context *ret;
-/* if (rat < 1) { - cpu_timer_start(&timer, "Blur"); - callback.priv = "Blurring Image"; - if (GP_FilterGaussianBlur(img, img, 0.5/rat, 0.5/rat, &callback) == NULL) - return NULL; - cpu_timer_stop(&timer); - } */ + /* Do low pass filter */ + if (resampling_method != GP_INTERP_LINEAR_LF_INT) { + if (rat < 1) { + cpu_timer_start(&timer, "Blur"); + callback.priv = "Blurring Image"; + if (GP_FilterGaussianBlur(img, img, 0.5/rat, 0.5/rat, &callback) == NULL) + return NULL; + cpu_timer_stop(&timer); + } + }
cpu_timer_start(&timer, "Resampling"); callback.priv = "Resampling Image"; - ret = GP_FilterResize(img, NULL, GP_INTERP_LINEAR_LF_INT, img->w * rat, img->h * rat, &callback); + ret = GP_FilterResize(img, NULL, resampling_method, img->w * rat, img->h * rat, &callback); GP_ContextFree(img); cpu_timer_stop(&timer);
@@ -314,12 +318,12 @@ int main(int argc, char *argv[]) { GP_InputDriverLinux *drv = NULL; const char *input_dev = NULL; - const char *backend_opts = "fb"; + const char *backend_opts = "SDL"; int sleep_sec = -1; struct loader_params params = {NULL, 0, 0, 0}; int opt;
- while ((opt = getopt(argc, argv, "b:Ii:Ps:r:")) != -1) { + while ((opt = getopt(argc, argv, "b:cIi:Ps:r:")) != -1) { switch (opt) { case 'I': params.show_info = 1; @@ -333,6 +337,9 @@ int main(int argc, char *argv[]) case 's': sleep_sec = atoi(optarg); break; + case 'c': + resampling_method = GP_INTERP_CUBIC_INT; + break; case 'r': if (!strcmp(optarg, "90")) rotate = 90;
http://repo.or.cz/w/gfxprim.git/commit/8fd80e09adcbee684f691159ea96bb852c5d1...
commit 8fd80e09adcbee684f691159ea96bb852c5d17a8 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 19 15:29:31 2012 +0100
demos: grinder padd output image name with enough zeroes.
diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c index 61ec494..2822bcf 100644 --- a/demos/grinder/grinder.c +++ b/demos/grinder/grinder.c @@ -901,7 +901,7 @@ int main(int argc, char *argv[]) for (i = optind; i < argc; i++) { char buf[255]; - snprintf(buf, sizeof(buf), "out_%i.%s", i - optind + 1, out_fmt); + snprintf(buf, sizeof(buf), "out_%03i.%s", i - optind + 1, out_fmt); fprintf(stderr, "Processing '%s' -> '%s'n", argv[i], buf);
progress_prefix = "Loading image";
-----------------------------------------------------------------------
Summary of changes: demos/fbshow/fbshow.c | 29 ++++++++++++++++++----------- demos/grinder/grinder.c | 2 +- 2 files changed, 19 insertions(+), 12 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.