lib: Split fpi_im_resize factor into width/height

https://bugs.freedesktop.org/show_bug.cgi?id=57426
This commit is contained in:
Vasily Khoruzhick 2012-11-22 10:12:38 +03:00 committed by Bastien Nocera
parent bc497f1b26
commit 22d204cc68
4 changed files with 8 additions and 8 deletions

View file

@ -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 /* FIXME: this is an ugly hack to make the image big enough for NBIS
* to process reliably */ * to process reliably */
img = fpi_im_resize(tmp, ENLARGE_FACTOR); img = fpi_im_resize(tmp, ENLARGE_FACTOR, ENLARGE_FACTOR);
fp_img_free(tmp); fp_img_free(tmp);
fpi_imgdev_image_captured(dev, img); fpi_imgdev_image_captured(dev, img);

View file

@ -362,7 +362,7 @@ int fpi_img_compare_print_data(struct fp_print_data *enrolled_print,
struct fp_print_data *new_print); struct fp_print_data *new_print);
int fpi_img_compare_print_data_to_gallery(struct fp_print_data *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_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 */ /* polling and timeouts */

View file

@ -22,10 +22,10 @@
#include "fp_internal.h" #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_width = img->width * w_factor;
int new_height = img->height * factor; int new_height = img->height * h_factor;
GdkPixbuf *orig, *resized; GdkPixbuf *orig, *resized;
struct fp_img *newimg; struct fp_img *newimg;
guchar *pixels; guchar *pixels;

View file

@ -22,14 +22,14 @@
#include "fp_internal.h" #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 *mimg;
Image *resized; Image *resized;
ExceptionInfo exception; ExceptionInfo exception;
MagickBooleanType ret; MagickBooleanType ret;
int new_width = img->width * factor; int new_width = img->width * w_factor;
int new_height = img->height * factor; int new_height = img->height * h_factor;
struct fp_img *newimg; struct fp_img *newimg;
/* It is possible to implement resizing using a simple algorithm, however /* It is possible to implement resizing using a simple algorithm, however