more clenaup, expect more bugs

This commit is contained in:
tth
2021-03-17 18:32:51 +01:00
parent 706e218ff0
commit 3632dc1680
23 changed files with 98 additions and 137 deletions

View File

@@ -29,9 +29,11 @@ static int rgb_interpolate(FloatImg *s1, FloatImg *s2, FloatImg *d, float coef)
{
int picsize, idx;
picsize = d->width * d->height * 3; /* rude hack ? */
picsize = d->width * d->height;
for (idx=0; idx<picsize; idx++) {
d->R[idx] = (coef * s1->R[idx]) + ((1.0-coef) * s2->R[idx]);
d->G[idx] = (coef * s1->G[idx]) + ((1.0-coef) * s2->G[idx]);
d->B[idx] = (coef * s1->B[idx]) + ((1.0-coef) * s2->B[idx]);
}
return 0;