contour 2x2 -> fimgfx

This commit is contained in:
2020-10-07 15:26:34 +02:00
parent 6a33b1d318
commit bbee507851
3 changed files with 22 additions and 11 deletions

View File

@@ -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 "
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
# -----------------------------------------------------

View File

@@ -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[] = {
{ "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) {
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);