fp-image: Remove config.h inclusion in fpi-header

And also avoid defining a function we expose depending on it's presency.
This commit is contained in:
Marco Trevisan (Treviño)
2019-12-17 04:33:20 +01:00
committed by Marco Trevisan
parent 54bb0c12e6
commit 6395dda012
3 changed files with 8 additions and 5 deletions

View File

@@ -24,6 +24,7 @@
#include "fpi-image.h" #include "fpi-image.h"
#include "fpi-log.h" #include "fpi-log.h"
#include <config.h>
#include <nbis.h> #include <nbis.h>
/** /**

View File

@@ -24,6 +24,7 @@
#include "fpi-log.h" #include "fpi-log.h"
#include <nbis.h> #include <nbis.h>
#include <config.h>
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
#include <pixman.h> #include <pixman.h>
@@ -107,12 +108,12 @@ fpi_mean_sq_diff_norm (const guint8 *buf1,
return res / size; return res / size;
} }
#ifdef HAVE_PIXMAN
FpImage * FpImage *
fpi_image_resize (FpImage *orig_img, fpi_image_resize (FpImage *orig_img,
guint w_factor, guint w_factor,
guint h_factor) guint h_factor)
{ {
#ifdef HAVE_PIXMAN
int new_width = orig_img->width * w_factor; int new_width = orig_img->width * w_factor;
int new_height = orig_img->height * h_factor; int new_height = orig_img->height * h_factor;
pixman_image_t *orig, *resized; pixman_image_t *orig, *resized;
@@ -145,5 +146,9 @@ fpi_image_resize (FpImage *orig_img,
pixman_image_unref (resized); pixman_image_unref (resized);
return newimg; return newimg;
} #else
fp_err ("Libfprint compiled without pixman support, impossible to resize");
return g_object_ref (orig_img);
#endif #endif
}

View File

@@ -20,7 +20,6 @@
#pragma once #pragma once
#include <config.h>
#include "fp-image.h" #include "fp-image.h"
/** /**
@@ -77,8 +76,6 @@ gint fpi_mean_sq_diff_norm (const guint8 *buf1,
const guint8 *buf2, const guint8 *buf2,
gint size); gint size);
#if HAVE_PIXMAN
FpImage *fpi_image_resize (FpImage *orig, FpImage *fpi_image_resize (FpImage *orig,
guint w_factor, guint w_factor,
guint h_factor); guint h_factor);
#endif