mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
29ca02bcf1
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
diff --git a/configure.ac b/configure.ac
|
|
index fe37c22..753a607 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -55,6 +55,7 @@ AC_CHECK_LIB([lept], [findFileFormatStream], [], [
|
|
echo "Error! Leptonica not detected."
|
|
exit -1
|
|
])
|
|
+AC_CHECK_FUNCS(expandBinaryPower2Low,,)
|
|
# test for function - it should detect leptonica dependecies
|
|
|
|
# Check for possible dependancies of leptonica.
|
|
diff --git a/src/jbig2.cc b/src/jbig2.cc
|
|
index e10f042..515c1ef 100644
|
|
--- a/src/jbig2.cc
|
|
+++ b/src/jbig2.cc
|
|
@@ -130,11 +130,16 @@ segment_image(PIX *pixb, PIX *piximg) {
|
|
// input color image, so we have to do it this way...
|
|
// is there a better way?
|
|
// PIX *pixd = pixExpandBinary(pixd4, 4);
|
|
- PIX *pixd = pixCreate(piximg->w, piximg->h, 1);
|
|
- pixCopyResolution(pixd, piximg);
|
|
- if (verbose) pixInfo(pixd, "mask image: ");
|
|
- expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
|
|
+ PIX *pixd;
|
|
+#ifdef HAVE_EXPANDBINARYPOWER2LOW
|
|
+ pixd = pixCreate(piximg->w, piximg->h, 1);
|
|
+ pixCopyResolution(pixd, piximg);
|
|
+ expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
|
|
pixd4->data, pixd4->w, pixd4->h, pixd4->wpl, 4);
|
|
+#else
|
|
+ pixd = pixExpandBinaryPower2(pixd4, 4);
|
|
+#endif
|
|
+ if (verbose) pixInfo(pixd, "mask image: ");
|
|
|
|
pixDestroy(&pixd4);
|
|
pixDestroy(&pixsf4);
|