From c842ff3f54600486281983f874f12a1832c02448 Mon Sep 17 00:00:00 2001 From: Mutah Date: Sun, 16 May 2021 11:43:46 +0200 Subject: [PATCH] FloatImg sources upgraded to version 148 --- src/floatimg.h | 2 +- src/lib/operators.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/floatimg.h b/src/floatimg.h index 57a8dc7..de54235 100644 --- a/src/floatimg.h +++ b/src/floatimg.h @@ -4,7 +4,7 @@ * http://la.buvette.org/photos/cumul */ -#define FIMG_VERSION 147 +#define FIMG_VERSION 148 /* * in memory descriptor diff --git a/src/lib/operators.c b/src/lib/operators.c index 14a5056..9e57bb3 100644 --- a/src/lib/operators.c +++ b/src/lib/operators.c @@ -175,11 +175,11 @@ if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type || nbiter = a->width * a->height; for (idx=0; idxR[idx] > b->R[idx]) d->R[idx] = a->R[idx]; + if (a->R[idx] < b->R[idx]) d->R[idx] = a->R[idx]; else d->R[idx] = b->R[idx]; - if (a->G[idx] > b->G[idx]) d->G[idx] = a->G[idx]; + if (a->G[idx] < b->G[idx]) d->G[idx] = a->G[idx]; else d->G[idx] = b->G[idx]; - if (a->B[idx] > b->B[idx]) d->B[idx] = a->B[idx]; + if (a->B[idx] < b->B[idx]) d->B[idx] = a->B[idx]; else d->B[idx] = b->B[idx]; } @@ -203,11 +203,11 @@ if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type || nbiter = a->width * a->height ; for (idx=0; idxR[idx] < b->R[idx]) d->R[idx] = a->R[idx]; + if (a->R[idx] > b->R[idx]) d->R[idx] = a->R[idx]; else d->R[idx] = b->R[idx]; - if (a->G[idx] < b->G[idx]) d->G[idx] = a->G[idx]; + if (a->G[idx] > b->G[idx]) d->G[idx] = a->G[idx]; else d->G[idx] = b->G[idx]; - if (a->B[idx] < b->B[idx]) d->B[idx] = a->B[idx]; + if (a->B[idx] > b->B[idx]) d->B[idx] = a->B[idx]; else d->B[idx] = b->B[idx]; }