From daeb4c72a7ce5bb3e79709a8e92b6f5720e01b55 Mon Sep 17 00:00:00 2001 From: tth Date: Mon, 10 May 2021 01:15:29 +0200 Subject: [PATCH] commit du soir, espoir --- experiment/essai.sh | 11 +++++++++-- experiment/extracteur.c | 24 +++++++++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/experiment/essai.sh b/experiment/essai.sh index 9a12fcc0..6c34440d 100755 --- a/experiment/essai.sh +++ b/experiment/essai.sh @@ -7,12 +7,19 @@ IMGS="foo.fimg" for idx in $(seq 0 69) do outf=$(printf "%s/X%04d.png" "/tmp" $idx) - echo $outf + echo "work on "$outf x=$(( idx * 4 )) y=$(( idx + 80 )) - ./extracteur $IMGS 320,200,${x},${y} $outf + ./extracteur $IMGS 256,128,${x},${y} $outf + error=$? + if [ 0 -ne $error ] ; then + echo error $error + exit 1 + fi + echo + done convert -delay 10 /tmp/X????.png foo.gif diff --git a/experiment/extracteur.c b/experiment/extracteur.c index f96c9d9c..65caa89d 100644 --- a/experiment/extracteur.c +++ b/experiment/extracteur.c @@ -24,7 +24,7 @@ float rgb[3]; if (verbosity) { fimg_describe(in, "source"); fimg_describe(out, "destination"); - print_rectangle(rect); + print_rectangle(__func__, rect); } count = 0; @@ -48,7 +48,6 @@ return 0; void help(int k) { puts("Usage:\n\textracteur in.fimg w,h,x,y out.???"); -exit(0); } /* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */ @@ -62,16 +61,23 @@ char *outfile = "out.fimg"; verbosity = 0; +#if 0 +for (foo=0; foo