Commit 4885b38b authored by Bastien Nocera's avatar Bastien Nocera

lib: Rename fpi_img_resize() to fpi_img_realloc()

To better match what it does. It does not resize an image, but
reallocate its internal data structure's size.
parent 5d4a5981
......@@ -71,7 +71,7 @@ submit_image(fpi_ssm *ssm,
img->width = VFS301_FP_OUTPUT_WIDTH;
img->height = height;
img = fpi_img_resize(img, img->height * img->width);
img = fpi_img_realloc(img, img->height * img->width);
fpi_imgdev_image_captured(dev, img);
return 1;
......
......@@ -87,7 +87,7 @@ gboolean fpi_img_is_sane(struct fp_img *img)
return TRUE;
}
struct fp_img *fpi_img_resize(struct fp_img *img, size_t newsize)
struct fp_img *fpi_img_realloc(struct fp_img *img, size_t newsize)
{
return g_realloc(img, sizeof(*img) + newsize);
}
......
......@@ -46,7 +46,7 @@ struct fp_img {
struct fp_img *fpi_img_new(size_t length);
struct fp_img *fpi_img_new_for_imgdev(struct fp_img_dev *dev);
struct fp_img *fpi_img_resize(struct fp_img *img, size_t newsize);
struct fp_img *fpi_img_realloc(struct fp_img *img, size_t newsize);
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int w_factor, unsigned int h_factor);
int fpi_std_sq_dev(const unsigned char *buf, int size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment