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:
parent
3dd905d4e9
commit
a3ae96c214
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue