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.
This commit is contained in:
Bastien Nocera 2018-11-09 13:35:40 +01:00
parent 5d4a5981d0
commit 4885b38be5
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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);
}

View file

@ -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);