forked from tTh/FloatImg
fixed an useless bug
This commit is contained in:
parent
92b7eb478c
commit
20e2f1e71e
@ -4,7 +4,7 @@
|
|||||||
* http://la.buvette.org/photos/cumul
|
* http://la.buvette.org/photos/cumul
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FIMG_VERSION 147
|
#define FIMG_VERSION 148
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in memory descriptor
|
* in memory descriptor
|
||||||
|
@ -175,11 +175,11 @@ if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type ||
|
|||||||
nbiter = a->width * a->height;
|
nbiter = a->width * a->height;
|
||||||
|
|
||||||
for (idx=0; idx<nbiter; idx++) {
|
for (idx=0; idx<nbiter; idx++) {
|
||||||
if (a->R[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];
|
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];
|
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];
|
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 ;
|
nbiter = a->width * a->height ;
|
||||||
|
|
||||||
for (idx=0; idx<nbiter; idx++) {
|
for (idx=0; idx<nbiter; idx++) {
|
||||||
if (a->R[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];
|
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];
|
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];
|
else d->B[idx] = b->B[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user