This commit is contained in:
tTh 2023-07-17 07:44:39 +02:00
parent ee5e081031
commit 8c0f55b7cb

View File

@ -40,15 +40,16 @@ if ( (foo=fimg_images_not_compatible(src, dst)) )
} }
nbpix = src->width * src->height; nbpix = src->width * src->height;
fprintf(stderr, "%s work on %d pixels\n", __func__, nbpix); if (verbosity > 1)
fprintf(stderr, "%s work on %d pixels\n", __func__, nbpix);
for (idx=0; idx<nbpix; idx++) { for (idx=0; idx<nbpix; idx++) {
dst->R[idx] = src->R[idx]; dst->R[idx] = src->R[idx];
dst->B[idx] = src->B[idx]; dst->B[idx] = src->B[idx];
if (dst->R[idx] > dst->B[idx]) if (src->R[idx] > src->B[idx])
dst->G[idx] = dst->R[idx]; dst->G[idx] = src->R[idx];
else else
dst->G[idx] = dst->B[idx]; dst->G[idx] = src->B[idx];
} }
return 0; return 0;