From 5b779456f94becba67b04b90e0c3b1f6a4b76ede Mon Sep 17 00:00:00 2001 From: zdenop Date: Thu, 24 Jul 2014 19:11:39 +0000 Subject: [PATCH] fix compatibility with leptonica 1.71 and 1.70 git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1126 d0cd1f9f-072b-0410-8dd7-cf729c803f20 --- api/pdfrenderer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/pdfrenderer.cpp b/api/pdfrenderer.cpp index 70054132..5b9ba3c4 100644 --- a/api/pdfrenderer.cpp +++ b/api/pdfrenderer.cpp @@ -438,7 +438,7 @@ bool TessPDFRenderer::fileToPDFObj(char *filename, long int objnum, return false; const char *filter; - int spp, w, h; + int bps, spp, w, h; int cmyk = false; int format; findFileFormatStream(fp, &format); @@ -448,7 +448,11 @@ bool TessPDFRenderer::fileToPDFObj(char *filename, long int objnum, filter = "/DCTDecode"; break; case IFF_JP2: +#if LIBLEPT_MINOR_VERSION == 70 && LIBLEPT_MAJOR_VERSION <= 1 freadHeaderJp2k(fp, &w, &h, &spp); +#else + freadHeaderJp2k(fp, &w, &h, &bps, &spp); +#endif filter = "/JPXDecode"; break; default: