From 4e972724a88e5713fba826400934653209e9a70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 17 Dec 2019 04:33:20 +0100 Subject: [PATCH] fp-image: Remove config.h inclusion in fpi-header --- libfprint/fp-image.c | 1 + libfprint/fpi-image.c | 9 +++++++-- libfprint/fpi-image.h | 3 --- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libfprint/fp-image.c b/libfprint/fp-image.c index ac70d68d..6b63a438 100644 --- a/libfprint/fp-image.c +++ b/libfprint/fp-image.c @@ -23,6 +23,7 @@ #include "fpi-image.h" #include "fpi-log.h" +#include #include /** diff --git a/libfprint/fpi-image.c b/libfprint/fpi-image.c index 83440376..1fb88656 100644 --- a/libfprint/fpi-image.c +++ b/libfprint/fpi-image.c @@ -24,6 +24,7 @@ #include "fpi-log.h" #include +#include #if HAVE_PIXMAN #include @@ -108,12 +109,12 @@ fpi_mean_sq_diff_norm (const guint8 *buf1, return res / size; } -#if HAVE_PIXMAN FpImage * fpi_image_resize (FpImage *orig_img, guint w_factor, guint h_factor) { +#if HAVE_PIXMAN int new_width = orig_img->width * w_factor; int new_height = orig_img->height * h_factor; pixman_image_t *orig, *resized; @@ -146,5 +147,9 @@ fpi_image_resize (FpImage *orig_img, pixman_image_unref (resized); return newimg; -} +#else + fp_err ("Libfprint compiled without pixman support, impossible to resize"); + + return NULL; #endif +} diff --git a/libfprint/fpi-image.h b/libfprint/fpi-image.h index dd6dbf88..2855c78f 100644 --- a/libfprint/fpi-image.h +++ b/libfprint/fpi-image.h @@ -20,7 +20,6 @@ #pragma once -#include #include "fp-image.h" /** @@ -76,8 +75,6 @@ gint fpi_mean_sq_diff_norm (const guint8 *buf1, const guint8 *buf2, gint size); -#if HAVE_PIXMAN FpImage *fpi_image_resize (FpImage *orig, guint w_factor, guint h_factor); -#endif