mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
use pdf L_FLATE_ENCODE only for png input; fixes #1961
This commit is contained in:
parent
5cf5c80ba1
commit
f794571195
@ -716,7 +716,8 @@ bool TessPDFRenderer::imageToPDFObj(Pix *pix,
|
||||
const int kJpegQuality = jpg_quality;
|
||||
|
||||
int format, sad;
|
||||
sad = pixGenerateCIData(pix, L_FLATE_ENCODE, 0, 0, &cid);
|
||||
if (pixGetInputFormat(pix) == IFF_PNG)
|
||||
sad = pixGenerateCIData(pix, L_FLATE_ENCODE, 0, 0, &cid);
|
||||
if (!cid) {
|
||||
sad = l_generateCIDataForPdf(filename, pix, kJpegQuality, &cid);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user