提交 7fc9a34f 编写于 作者: S Stefan Weil

Rename processed TIFF output file and add page number if needed (fixes issue #3544)

Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 40fdacd4
......@@ -107,7 +107,7 @@ OPTIONS
* *pdf* -- Output PDF ('OUTPUTBASE'`.pdf`).
* *tsv* -- Output TSV ('OUTPUTBASE'`.tsv`).
* *txt* -- Output plain text ('OUTPUTBASE'`.txt`).
* *get.images* -- Write processed input images to file (`tessinput.tif`).
* *get.images* -- Write processed input images to file ('OUTPUTBASE'`.processedPAGENUMBER.tif`).
* *logfile* -- Redirect debug messages to file (`tesseract.log`).
* *lstm.train* -- Output files used by LSTM training ('OUTPUTBASE'`.lstmf`).
* *makebox* -- Write box file ('OUTPUTBASE'`.box`).
......
......@@ -1276,7 +1276,12 @@ bool TessBaseAPI::ProcessPage(Pix *pix, int page_index, const char *filename,
if (tesseract_->tessedit_write_images) {
Pix *page_pix = GetThresholdedImage();
pixWrite("tessinput.tif", page_pix, IFF_TIFF_G4);
std::string output_filename = output_file_ + ".processed";
if (page_index > 0) {
output_filename += std::to_string(page_index);
}
output_filename += ".tif";
pixWrite(output_filename.c_str(), page_pix, IFF_TIFF_G4);
}
if (failed && retry_config != nullptr && retry_config[0] != '\0') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册