forked from tTh/FloatImg
*OUPS!*
This commit is contained in:
parent
ee5e081031
commit
8c0f55b7cb
@ -40,15 +40,16 @@ if ( (foo=fimg_images_not_compatible(src, dst)) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
nbpix = src->width * src->height;
|
nbpix = src->width * src->height;
|
||||||
|
if (verbosity > 1)
|
||||||
fprintf(stderr, "%s work on %d pixels\n", __func__, nbpix);
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user