From d3c52d61278d909ddb7d70cfc087f96d6bb66c5a Mon Sep 17 00:00:00 2001 From: Tonton Th Date: Fri, 17 Jan 2020 10:53:45 +0100 Subject: [PATCH] func 'fimg_mul_2' added --- funcs/fimg-tiff.c | 2 ++ lib/operators.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/funcs/fimg-tiff.c b/funcs/fimg-tiff.c index 76a509a4..f9b59f3e 100644 --- a/funcs/fimg-tiff.c +++ b/funcs/fimg-tiff.c @@ -14,6 +14,8 @@ int essai_ecrire_tiff(FloatImg *src, char *fname) /* bon, tout cela semble bien tortueux ! */ + fprintf(stderr, "%s %s to be implemented\n", __FILE__, __func__); + return 0; } /* --------------------------------------------------------------------- */ diff --git a/lib/operators.c b/lib/operators.c index cd703d2d..12cdc3a5 100644 --- a/lib/operators.c +++ b/lib/operators.c @@ -98,6 +98,32 @@ for (idx=0; idx>> %s ( %p %p )\n", __func__, a, b); +#endif + +if (3 != a->type || 3 != b->type) { + fprintf(stderr, "%s : got a bad type fimg\n", __func__); + return -8; + } + +nbpixels = a->width * a->height; + +for (idx=0; idxR[idx] *= a->R[idx]; + b->G[idx] *= a->G[idx]; + b->B[idx] *= a->B[idx]; + } + } /* ---------------------------------------------------------------- */ /*