diff --git a/floatimg.h b/floatimg.h index 19b52bec..8b4ea812 100644 --- a/floatimg.h +++ b/floatimg.h @@ -98,6 +98,7 @@ int fimg_filter_3x3(FloatImg *s, FloatImg *d, FimgFilter3x3 *filtr); /* 'sfx0' module */ int fimg_killcolors_a(FloatImg *fimg, float fval); int fimg_killcolors_b(FloatImg *fimg, float fval); +int fimg_colors_mixer_a(FloatImg *fimg, float fval); /* funcs/rotate.c module */ /* #coronamaison */ diff --git a/funcs/sfx0.c b/funcs/sfx0.c index 6f1da282..729b8880 100644 --- a/funcs/sfx0.c +++ b/funcs/sfx0.c @@ -54,3 +54,33 @@ for (foo=0; footype) { + fprintf(stderr, "%s: bad src type %d on %p\n", __func__, + fimg->type, fimg); +#if MUST_ABORT + abort(); +#endif + return -8; + } + +nbpix = fimg->width * fimg->height; + +for (foo=0; fooG[foo] + fimg->B[foo]) / fval; + G = (fimg->R[foo] + fimg->B[foo]) / fval; + B = (fimg->R[foo] + fimg->G[foo]) / fval; + + fimg->R[foo] = R; + fimg->G[foo] = G; + fimg->B[foo] = B; + } + +return 0; +} +/* --------------------------------------------------------------------- */