lib: Split fpi_im_resize factor into width/height
https://bugs.freedesktop.org/show_bug.cgi?id=57426
This commit is contained in:
parent
bc497f1b26
commit
22d204cc68
4 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue