integration de fimg_colors_mixer_a dans fimgfx

This commit is contained in:
tth 2020-06-23 11:09:42 +02:00
parent 59cbb3c1e0
commit 9517c8a10f
2 changed files with 13 additions and 2 deletions

View File

@ -23,7 +23,13 @@ function essai_drand48
./fimgstats -vv $TMPF
}
# -----------------------------------------------------
function essai_cmixa
{
./mkfimg -v -t tpat0 $TMPF 800 600
./fimgfx -v cmixa $TMPF bar.fimg
}
# -----------------------------------------------------
essai_drand48
essai_cmixa
# -----------------------------------------------------

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_rot90, Fx_cmixa,
Fx_xper };
Fx fx_list[] = {
@ -32,6 +32,7 @@ Fx fx_list[] = {
{ "gray0", Fx_gray0, 0, 1 },
{ "halfsz0", Fx_halfsz0, 0, 1 },
{ "rot90", Fx_rot90, 0, 0 },
{ "cmixa", Fx_cmixa, 0, 1 },
{ "xper", Fx_xper, 0, 1 },
{ NULL, 0, 0 }
};
@ -157,6 +158,10 @@ switch (action) {
case Fx_rot90:
foo = fimg_rotate_90(&src, &dest, 0); break;
case Fx_cmixa:
fimg_copy_data(&src, &dest);
foo = fimg_colors_mixer_a(&dest, 2.0); break;
case Fx_halfsz0:
fprintf(stderr, "halfsize was not implemented\n");
return -3;