add fimg_mix_rgb_gray support to fimgfx

This commit is contained in:
Tonton Th 2020-07-29 02:57:06 +02:00
parent 14062a9586
commit 6ab57a4046

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_rot90, Fx_cmixa, Fx_Desat,
Fx_xper };
Fx fx_list[] = {
@ -34,6 +34,7 @@ Fx fx_list[] = {
{ "rot90", Fx_rot90, 0, 0 },
{ "cmixa", Fx_cmixa, 0, 1 },
{ "xper", Fx_xper, 0, 1 },
{ "desat", Fx_Desat, 0, 1 },
{ NULL, 0, 0 }
};
@ -166,6 +167,11 @@ switch (action) {
fprintf(stderr, "halfsize was not implemented\n");
return -3;
case Fx_Desat:
fimg_copy_data(&src, &dest);
foo = fimg_mix_rgb_gray(&dest, global_fvalue);
break;
default:
fprintf(stderr, "%s %s : %d is bad action\n",
__FILE__, __func__, action);