forked from tTh/FloatImg
+ triplemul & little clean
This commit is contained in:
parent
5a90dce59d
commit
49d2703612
@ -270,6 +270,10 @@ switch (idFx) {
|
|||||||
retval = fimg_power_2(image, image, 1000.0);
|
retval = fimg_power_2(image, image, 1000.0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CR_triplemul:
|
||||||
|
retval = fimg_sfx_triplemul(image, image, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
/* here are the glitches */
|
/* here are the glitches */
|
||||||
case CR_bsombra: /* experiment ! */
|
case CR_bsombra: /* experiment ! */
|
||||||
retval = des_bords_sombres_a(image, 160);
|
retval = des_bords_sombres_a(image, 160);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* http://la.buvette.org/photos/cumul
|
* http://la.buvette.org/photos/cumul
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FIMG_VERSION 151
|
#define FIMG_VERSION 152
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in memory descriptor
|
* in memory descriptor
|
||||||
@ -123,6 +123,9 @@ int fimg_highlight_color(FloatImg *src, FloatImg *dst,
|
|||||||
int fimg_binarize(FloatImg *pimg, int notused);
|
int fimg_binarize(FloatImg *pimg, int notused);
|
||||||
int fimg_trinarize(FloatImg *pimg, int notused);
|
int fimg_trinarize(FloatImg *pimg, int notused);
|
||||||
|
|
||||||
|
/* module sfx3.c */
|
||||||
|
|
||||||
|
|
||||||
/* module sfx4.c */
|
/* module sfx4.c */
|
||||||
int fimg_sfx_triplemul(FloatImg *s, FloatImg *d, int notused);
|
int fimg_sfx_triplemul(FloatImg *s, FloatImg *d, int notused);
|
||||||
|
|
||||||
|
@ -27,11 +27,13 @@ fprintf(stderr, ">>> %s ( %p 0x%04x )\n", __func__, img, notused);
|
|||||||
for (y=0; y<src->height; y++) {
|
for (y=0; y<src->height; y++) {
|
||||||
for (x=0; x<src->width; x++) {
|
for (x=0; x<src->width; x++) {
|
||||||
foo = fimg_get_rgb(src, x, y, in);
|
foo = fimg_get_rgb(src, x, y, in);
|
||||||
|
if (foo) return foo;
|
||||||
out[0] = in[1] * in[2];
|
out[0] = in[1] * in[2];
|
||||||
out[1] = in[0] * in[2];
|
out[1] = in[0] * in[2];
|
||||||
out[2] = in[0] * in[1];
|
out[2] = in[0] * in[1];
|
||||||
// fprintf(stderr, "%9f %9f %9f\n", out[0], out[1], out[2]);
|
// fprintf(stderr, "%9f %9f %9f\n", out[0], out[1], out[2]);
|
||||||
foo = fimg_put_rgb(dst, x, y, out);
|
foo = fimg_put_rgb(dst, x, y, out);
|
||||||
|
if (foo) return foo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@ switch (action) {
|
|||||||
case Fx_hilight_R:
|
case Fx_hilight_R:
|
||||||
foo = fimg_highlight_color(&src, &dest, 'R', 1.333);
|
foo = fimg_highlight_color(&src, &dest, 'R', 1.333);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s %s : %d is bad action\n",
|
fprintf(stderr, "%s %s : %d is bad action\n",
|
||||||
__FILE__, __func__, action);
|
__FILE__, __func__, action);
|
||||||
|
Loading…
Reference in New Issue
Block a user