From d5ccf30dccba7c8811acfa2f18c74decdde9847b Mon Sep 17 00:00:00 2001 From: tonton th Date: Fri, 4 Dec 2020 23:14:44 +0100 Subject: [PATCH] testing filter chain --- Fonderie/essai.sh | 23 ++++++++++++++++------- Fonderie/t.c | 8 +++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Fonderie/essai.sh b/Fonderie/essai.sh index 50d7ff33..64ca40be 100755 --- a/Fonderie/essai.sh +++ b/Fonderie/essai.sh @@ -1,16 +1,25 @@ #!/bin/bash -OUTF='/tmp/out_a*.png' +FILTRES="5:6:13 2 5:6:8 4:25 8:13:13:7 10:1 25:25:25" -rm $OUTF +for F in $FILTRES +do -make t && ./t + I="/tmp/fstack"$F".png" + echo ; echo $I + ./t -F $F + txt=$(printf "[%-10s]" $F) + convert foo.png -pointsize 32 -kerning 0 \ + -fill Orange -undercolor Gray20 \ + -font Courier-Bold \ + -annotate +20+40 "$txt" \ + $I + +done + +convert -delay 100 /tmp/fstack*.png foo.gif -A_PART=$(ls -1 $OUTF) -Z_PART=$(ls -r1 $OUTF) - -convert -delay 10 ${A_PART} ${Z_PART} foo.gif diff --git a/Fonderie/t.c b/Fonderie/t.c index 0bcc98fd..5bcf58ac 100644 --- a/Fonderie/t.c +++ b/Fonderie/t.c @@ -41,7 +41,7 @@ if (foo) { return 0; } /* ----------------------------------------------------------- */ -int parse_filter_chain(char *argument) +int parse_filter_chain(const char *argument) { char *cptr; int value, foo; @@ -69,7 +69,7 @@ for (;;) { } } -filterstack_list(__func__); +if (verbosity) filterstack_list(__func__); return 0; } /* ----------------------------------------------------------- */ @@ -107,14 +107,12 @@ fprintf(stderr, "%s : argc = %d, optind = %d\n", argv[0], argc, optind); parse_filter_chain(filterchain); -foo = fimg_create(&image, W, H, FIMG_TYPE_RGB); +foo = fimg_create_from_dump("mire.fimg", &image); if (foo) { fprintf(stderr, "err %d create image\n", foo); exit(1); } -fimg_vdeg_a(&image, 255); - srand(getpid()); debut = fimg_timer_set(TIMER); foo = essai_filterstack(&image);