From a4e1378218ffa2b82c0bec867981b76cdffea5ab Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 May 2019 14:23:43 +0200 Subject: [PATCH] Fix broken build for Leptonica < 1.77 Signed-off-by: Stefan Weil --- src/api/baseapi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index 4813f952a..69bf7ce83 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -66,7 +66,7 @@ #include "equationdetect.h" // for EquationDetect #include "errcode.h" // for ASSERT_HOST #include "helpers.h" // for IntCastRounded, chomp_string -#include "imageio.h" // for IFF_TIFF_G4, IFF_TIFF, IFF_TIFF_G3 +#include "imageio.h" // for IFF_TIFF_G4, IFF_TIFF, IFF_TIFF_G3, ... #ifndef DISABLED_LEGACY_ENGINE #include "intfx.h" // for INT_FX_RESULT_STRUCT #endif @@ -1148,7 +1148,10 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename, bool tiff = (format == IFF_TIFF || format == IFF_TIFF_PACKBITS || format == IFF_TIFF_RLE || format == IFF_TIFF_G3 || format == IFF_TIFF_G4 || format == IFF_TIFF_LZW || - format == IFF_TIFF_ZIP || format == IFF_TIFF_JPEG); +#if LIBLEPT_MAJOR_VERSION > 1 || LIBLEPT_MINOR_VERSION > 76 + format == IFF_TIFF_JPEG || +#endif + format == IFF_TIFF_ZIP); // Fail early if we can, before producing any output Pix *pix = nullptr;