diff --git a/lib/operators.c b/lib/operators.c index 12cdc3a..1c2b313 100644 --- a/lib/operators.c +++ b/lib/operators.c @@ -27,7 +27,9 @@ int idx, nbpixels; fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); #endif -if (3 != a->type || 3 != b->type || 3 != d->type) { +if (FIMG_TYPE_RGB != a->type || + FIMG_TYPE_RGB != b->type || + FIMG_TYPE_RGB != d->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -54,7 +56,7 @@ int idx, nbpixels; fprintf(stderr, ">>> %s ( %p %p )\n", __func__, a, b); #endif -if (3 != a->type || 3 != b->type) { +if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -81,7 +83,9 @@ int idx, nbpixels; fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); #endif -if (3 != a->type || 3 != b->type || 3 != d->type) { +if (FIMG_TYPE_RGB != a->type || + FIMG_TYPE_RGB != b->type || + FIMG_TYPE_RGB != d->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -111,7 +115,7 @@ int idx, nbpixels; fprintf(stderr, ">>> %s ( %p %p )\n", __func__, a, b); #endif -if (3 != a->type || 3 != b->type) { +if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -124,6 +128,7 @@ for (idx=0; idxB[idx] *= a->B[idx]; } +return 0; } /* ---------------------------------------------------------------- */ /* @@ -137,7 +142,8 @@ int idx, nbpixels; fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); #endif -if (3 != a->type || 3 != b->type || 3 != d->type) { +if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type || + FIMG_TYPE_RGB != d->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -161,7 +167,8 @@ int idx, nbiter; fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); #endif -if (3 != a->type || 3 != b->type || 3 != d->type) { +if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type || + FIMG_TYPE_RGB != d->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; } @@ -186,7 +193,8 @@ int idx, nbiter; fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); #endif -if (3 != a->type || 3 != b->type || 3 != d->type) { +if (FIMG_TYPE_RGB != a->type || FIMG_TYPE_RGB != b->type || + FIMG_TYPE_RGB != d->type) { fprintf(stderr, "%s : got a bad type fimg\n", __func__); return -8; }