mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Rename processed TIFF output file and add page number if needed (fixes issue #3544)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
40fdacd485
commit
7fc9a34f79
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user