more clenaup, expect more bugs
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user