mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
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
This commit is contained in:
parent
c550aee2f9
commit
5b779456f9
@ -438,7 +438,7 @@ bool TessPDFRenderer::fileToPDFObj(char *filename, long int objnum,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
const char *filter;
|
const char *filter;
|
||||||
int spp, w, h;
|
int bps, spp, w, h;
|
||||||
int cmyk = false;
|
int cmyk = false;
|
||||||
int format;
|
int format;
|
||||||
findFileFormatStream(fp, &format);
|
findFileFormatStream(fp, &format);
|
||||||
@ -448,7 +448,11 @@ bool TessPDFRenderer::fileToPDFObj(char *filename, long int objnum,
|
|||||||
filter = "/DCTDecode";
|
filter = "/DCTDecode";
|
||||||
break;
|
break;
|
||||||
case IFF_JP2:
|
case IFF_JP2:
|
||||||
|
#if LIBLEPT_MINOR_VERSION == 70 && LIBLEPT_MAJOR_VERSION <= 1
|
||||||
freadHeaderJp2k(fp, &w, &h, &spp);
|
freadHeaderJp2k(fp, &w, &h, &spp);
|
||||||
|
#else
|
||||||
|
freadHeaderJp2k(fp, &w, &h, &bps, &spp);
|
||||||
|
#endif
|
||||||
filter = "/JPXDecode";
|
filter = "/JPXDecode";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user