Browse Source

contour 2x2 -> fimgfx

master
tth 2 years ago
parent
commit
bbee507851
  1. 13
      funcs/vroum.sh
  2. 9
      tools/essai.sh
  3. 11
      tools/fimgfx.c

13
funcs/vroum.sh

@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
#!/bin/bash
src=foo.fimg
maxi=179
grabopt=" s 320x240 -vv -p 0 -n 100 -c none "
maxi=49
grabopt=" -s 1280x720 -vv -p 0 -n 200 -c none "
mkdir V
for foo in $(seq 0 $maxi)
do
echo
grabvidseq -$grabopt -o $src
fval=$(echo "$foo / $maxi" | bc -l)
@ -16,11 +18,10 @@ do @@ -16,11 +18,10 @@ do
echo $foo $fval
nom=$(printf "v_%03d.pnm" $foo)
nom=$(printf "V/%03d.pnm" $foo)
cp out.pnm $nom
echo $nom
done
convert -delay 20 v_*.pnm foo.gif
convert -delay 20 V/*.pnm foo.gif

9
tools/essai.sh

@ -27,7 +27,6 @@ function essai_cmixa @@ -27,7 +27,6 @@ function essai_cmixa
{
./mkfimg -vv -t tpat0 $TMPF 800 600
./fimgfx -vv cmixa $TMPF bar.fimg
}
# -----------------------------------------------------
function essai_cumulator
@ -42,7 +41,13 @@ D=" 800 600 " @@ -42,7 +41,13 @@ D=" 800 600 "
hdeg.fimg pat0.fimg rand.fimg vdeg.fimg
}
# -----------------------------------------------------
function essai_contour
{
./mkfimg -vv -t tpat0 $TMPF 800 600
./fimgfx -vv ctr2x2 $TMPF bar.fimg
}
# -----------------------------------------------------
essai_cumulator
essai_contour
# -----------------------------------------------------

11
tools/fimgfx.c

@ -21,7 +21,7 @@ typedef struct { @@ -21,7 +21,7 @@ typedef struct {
} Fx;
enum fxid { Fx_cos01=5, Fx_cos010, Fx_pow2, Fx_sqrt, Fx_gray0, Fx_halfsz0,
Fx_rot90, Fx_cmixa, Fx_Desat,
Fx_rot90, Fx_cmixa, Fx_desat, Fx_ctr2x2,
Fx_xper };
Fx fx_list[] = {
@ -34,7 +34,8 @@ Fx fx_list[] = { @@ -34,7 +34,8 @@ Fx fx_list[] = {
{ "rot90", Fx_rot90, 0, 0 },
{ "cmixa", Fx_cmixa, 0, 1 },
{ "xper", Fx_xper, 0, 1 },
{ "desat", Fx_Desat, 0, 1 },
{ "desat", Fx_desat, 0, 1 },
{ "ctr2x2", Fx_ctr2x2, 0, 1 },
{ NULL, 0, 0 }
};
@ -170,11 +171,15 @@ switch (action) { @@ -170,11 +171,15 @@ switch (action) {
fprintf(stderr, "halfsize was not implemented\n");
return -3;
case Fx_Desat:
case Fx_desat:
fimg_copy_data(&src, &dest);
foo = fimg_mix_rgb_gray(&dest, global_fvalue);
break;
case Fx_ctr2x2:
foo = fimg_contour_2x2(&src, &dest, 0);
break;
default:
fprintf(stderr, "%s %s : %d is bad action\n",
__FILE__, __func__, action);

Loading…
Cancel
Save