diff --git a/Fonderie/crapulator.c b/Fonderie/crapulator.c index 83abc5d..ac3b3ed 100644 --- a/Fonderie/crapulator.c +++ b/Fonderie/crapulator.c @@ -76,9 +76,27 @@ fimg_destroy(&img); return retval; } /* -------------------------------------------------------------- */ +static int desaturate(FloatImg *pimg) +{ +FloatImg img; +int retval; +fimg_clone(pimg, &img, 0); +retval = fimg_desaturate(pimg, &img, 0); +if (retval) { + fprintf(stderr, "%s : err desaturate %d\n", + __func__, retval); + exit(1); + } +fimg_copy_data(&img, pimg); +fimg_destroy(&img); + +return 0; +} +/* -------------------------------------------------------------- */ /* - * This is the main filter engine - * used both for input and output + * This is the main filter engine used both for input and + * output processing. It can be called by the filterstack + * processor. */ #define DEBUG_THIS_CRAP 0 @@ -128,7 +146,7 @@ switch (idFx) { fimg_get_maxvalue(image)*0.8); break; case 6: - fimg_killcolors_a(image, 0.0); + retval = fimg_killcolors_a(image, 0.0); break; case 7: retval = fimg_colors_mixer_a(image, 2.0); @@ -151,6 +169,11 @@ switch (idFx) { case 13: retval = insitu_filtre3x3(image); break; + case 14: + retval = desaturate(image); + break; + + /* here are the glitches */ case 24: /* experiment ! */ retval = des_bords_sombres_a(image, 160); break; diff --git a/Fonderie/essai.sh b/Fonderie/essai.sh index 6b54512..91df6e4 100755 --- a/Fonderie/essai.sh +++ b/Fonderie/essai.sh @@ -1,6 +1,6 @@ #!/bin/bash -FILTRES="5:6:13 2:2 5:9:8 4:25 8:13:13:7 10:1 25:25:25:25" +FILTRES="5:6:13 2:2 5:9:8 4:25 8:13:13:7 10:1 25:25:25:25 13:14:13" rm /tmp/fstack*.png @@ -11,12 +11,12 @@ do echo ; echo $I ./t -F $F txt=$(printf "[%-10s]" $F) - convert foo.png -pointsize 28 -kerning 0 \ + convert foo.png -pointsize 24 -kerning 0 \ -fill Gray80 -undercolor Gray20 \ -font Courier-Bold \ - -annotate +0+25 "$txt" \ + -annotate +0+23 "$txt" \ $I done -convert -delay 150 /tmp/fstack*.png foo.gif +convert -delay 100 /tmp/fstack*.png foo.gif