Skip to content

Commit 6395dda

Browse files
committed
fp-image: Remove config.h inclusion in fpi-header
And also avoid defining a function we expose depending on it's presency.
1 parent 54bb0c1 commit 6395dda

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

libfprint/fp-image.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "fpi-image.h"
2525
#include "fpi-log.h"
2626

27+
#include <config.h>
2728
#include <nbis.h>
2829

2930
/**

libfprint/fpi-image.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "fpi-log.h"
2525

2626
#include <nbis.h>
27+
#include <config.h>
2728

2829
#ifdef HAVE_PIXMAN
2930
#include <pixman.h>
@@ -107,12 +108,12 @@ fpi_mean_sq_diff_norm (const guint8 *buf1,
107108
return res / size;
108109
}
109110

110-
#ifdef HAVE_PIXMAN
111111
FpImage *
112112
fpi_image_resize (FpImage *orig_img,
113113
guint w_factor,
114114
guint h_factor)
115115
{
116+
#ifdef HAVE_PIXMAN
116117
int new_width = orig_img->width * w_factor;
117118
int new_height = orig_img->height * h_factor;
118119
pixman_image_t *orig, *resized;
@@ -145,5 +146,9 @@ fpi_image_resize (FpImage *orig_img,
145146
pixman_image_unref (resized);
146147

147148
return newimg;
148-
}
149+
#else
150+
fp_err ("Libfprint compiled without pixman support, impossible to resize");
151+
152+
return g_object_ref (orig_img);
149153
#endif
154+
}

libfprint/fpi-image.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#pragma once
2222

23-
#include <config.h>
2423
#include "fp-image.h"
2524

2625
/**
@@ -77,8 +76,6 @@ gint fpi_mean_sq_diff_norm (const guint8 *buf1,
7776
const guint8 *buf2,
7877
gint size);
7978

80-
#if HAVE_PIXMAN
8179
FpImage *fpi_image_resize (FpImage *orig,
8280
guint w_factor,
8381
guint h_factor);
84-
#endif

0 commit comments

Comments
 (0)