ahem, of-by-one error ?

master
tth 3 years ago
parent 2f3a8870c4
commit ec56f998c2
  1. 10
      lib/interpolate.c

@ -10,6 +10,12 @@
int verbosity;
/* ---------------------------------------------------------------- */
static int gray_interpolate(FloatImg *s1, FloatImg *s2, FloatImg *d, float coef)
{
return -1;
}
/* ---------------------------------------------------------------- */
int fimg_interpolate(FloatImg *s1, FloatImg *s2, FloatImg *d, float coef)
{
int picsize, idx;
@ -31,7 +37,7 @@ if (FIMG_TYPE_RGB != d->type) {
return -9;
}
picsize = d->width * d->height * 2;
picsize = d->width * d->height * 3;
for (idx=0; idx<picsize; idx++) {
@ -39,6 +45,6 @@ for (idx=0; idx<picsize; idx++) {
}
return -1;
return 0;
}
/* ---------------------------------------------------------------- */

Loading…
Cancel
Save