Merge pull request #3364 from stweil/master

Suppress output of page number for TIFF files with a single image
This commit is contained in:
Egor Pugin 2021-03-23 21:46:14 +03:00 committed by GitHub
commit 6ee69db22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1059,7 +1059,10 @@ bool TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8 *data, size_t size, co
if (pix == nullptr) {
break;
}
tprintf("Page %d\n", page + 1);
if (offset || page > 0) {
// Only print page number for multipage TIFF file.
tprintf("Page %d\n", page + 1);
}
char page_str[kMaxIntSize];
snprintf(page_str, kMaxIntSize - 1, "%d", page);
SetVariable("applybox_page", page_str);