desaturate added to crapulator
This commit is contained in:
parent
16c7d1ec4a
commit
8668e15d3e
@ -76,9 +76,27 @@ fimg_destroy(&img);
|
|||||||
return retval;
|
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
|
* This is the main filter engine used both for input and
|
||||||
* used both for input and output
|
* output processing. It can be called by the filterstack
|
||||||
|
* processor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEBUG_THIS_CRAP 0
|
#define DEBUG_THIS_CRAP 0
|
||||||
@ -128,7 +146,7 @@ switch (idFx) {
|
|||||||
fimg_get_maxvalue(image)*0.8);
|
fimg_get_maxvalue(image)*0.8);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
fimg_killcolors_a(image, 0.0);
|
retval = fimg_killcolors_a(image, 0.0);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
retval = fimg_colors_mixer_a(image, 2.0);
|
retval = fimg_colors_mixer_a(image, 2.0);
|
||||||
@ -151,6 +169,11 @@ switch (idFx) {
|
|||||||
case 13:
|
case 13:
|
||||||
retval = insitu_filtre3x3(image);
|
retval = insitu_filtre3x3(image);
|
||||||
break;
|
break;
|
||||||
|
case 14:
|
||||||
|
retval = desaturate(image);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* here are the glitches */
|
||||||
case 24: /* experiment ! */
|
case 24: /* experiment ! */
|
||||||
retval = des_bords_sombres_a(image, 160);
|
retval = des_bords_sombres_a(image, 160);
|
||||||
break;
|
break;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/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
|
rm /tmp/fstack*.png
|
||||||
|
|
||||||
@ -11,12 +11,12 @@ do
|
|||||||
echo ; echo $I
|
echo ; echo $I
|
||||||
./t -F $F
|
./t -F $F
|
||||||
txt=$(printf "[%-10s]" $F)
|
txt=$(printf "[%-10s]" $F)
|
||||||
convert foo.png -pointsize 28 -kerning 0 \
|
convert foo.png -pointsize 24 -kerning 0 \
|
||||||
-fill Gray80 -undercolor Gray20 \
|
-fill Gray80 -undercolor Gray20 \
|
||||||
-font Courier-Bold \
|
-font Courier-Bold \
|
||||||
-annotate +0+25 "$txt" \
|
-annotate +0+23 "$txt" \
|
||||||
$I
|
$I
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
convert -delay 150 /tmp/fstack*.png foo.gif
|
convert -delay 100 /tmp/fstack*.png foo.gif
|
||||||
|
Loading…
Reference in New Issue
Block a user