Commit 22d204cc authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Bastien Nocera

lib: Split fpi_im_resize factor into width/height

https://bugs.freedesktop.org/show_bug.cgi?id=57426
parent bc497f1b
......@@ -155,7 +155,7 @@ static void img_cb(struct libusb_transfer *transfer)
/* FIXME: this is an ugly hack to make the image big enough for NBIS
* to process reliably */
img = fpi_im_resize(tmp, ENLARGE_FACTOR);
img = fpi_im_resize(tmp, ENLARGE_FACTOR, ENLARGE_FACTOR);
fp_img_free(tmp);
fpi_imgdev_image_captured(dev, img);
......
......@@ -362,7 +362,7 @@ int fpi_img_compare_print_data(struct fp_print_data *enrolled_print,
struct fp_print_data *new_print);
int fpi_img_compare_print_data_to_gallery(struct fp_print_data *print,
struct fp_print_data **gallery, int match_threshold, size_t *match_offset);
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor);
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int w_factor, unsigned int h_factor);
/* polling and timeouts */
......
......@@ -22,10 +22,10 @@
#include "fp_internal.h"
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor)
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int w_factor, unsigned int h_factor)
{
int new_width = img->width * factor;
int new_height = img->height * factor;
int new_width = img->width * w_factor;
int new_height = img->height * h_factor;
GdkPixbuf *orig, *resized;
struct fp_img *newimg;
guchar *pixels;
......
......@@ -22,14 +22,14 @@
#include "fp_internal.h"
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor)
struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int w_factor, unsigned int h_factor)
{
Image *mimg;
Image *resized;
ExceptionInfo exception;
MagickBooleanType ret;
int new_width = img->width * factor;
int new_height = img->height * factor;
int new_width = img->width * w_factor;
int new_height = img->height * h_factor;
struct fp_img *newimg;
/* It is possible to implement resizing using a simple algorithm, however
......
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