Fix function fpi_im_resize on create new image

The function fpi_im_resize copy the new resized image into old fp_img
instead of newimg so, new image is empty and often it generated a
segmentation fault error.
This commit is contained in:
Sergio Cerlesi 2011-02-22 14:39:11 +01:00 committed by Bastien Nocera
parent 3dd905d4e9
commit a3ae96c214

View file

@ -75,7 +75,7 @@ struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor)
for (x = 0; x < newimg->width; x++) {
guchar *p, *r;
r = img->data + y * img->width + x;
r = newimg->data + y * newimg->width + x;
p = pixels + y * rowstride + x * 3;
r[0] = p[0];
}