From 6ab57a40468434dbb2b14f446584536e3af7d38c Mon Sep 17 00:00:00 2001 From: tth Date: Wed, 29 Jul 2020 02:57:06 +0200 Subject: [PATCH] add fimg_mix_rgb_gray support to fimgfx --- tools/fimgfx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/fimgfx.c b/tools/fimgfx.c index b6e84520..48ace935 100644 --- a/tools/fimgfx.c +++ b/tools/fimgfx.c @@ -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);