Browse Source

add fimg_mix_rgb_gray support to fimgfx

master
tth 2 years ago
parent
commit
6ab57a4046
  1. 8
      tools/fimgfx.c

8
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_rot90, Fx_cmixa, Fx_Desat,
Fx_xper };
Fx fx_list[] = {
@ -34,6 +34,7 @@ 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) { @@ -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);

Loading…
Cancel
Save