mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
fix #665 process file list
This commit is contained in:
parent
170573f044
commit
a979494897
@ -1085,7 +1085,15 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename,
|
||||
|
||||
// Maybe we have a filelist
|
||||
if (r != 0 || format == IFF_UNKNOWN) {
|
||||
STRING s(buf.c_str());
|
||||
STRING s;
|
||||
if (stdInput) {
|
||||
s = buf.c_str();
|
||||
} else {
|
||||
std::ifstream t(filename);
|
||||
std::string u((std::istreambuf_iterator<char>(t)),
|
||||
std::istreambuf_iterator<char>());
|
||||
s = u.c_str();
|
||||
}
|
||||
return ProcessPagesFileList(NULL, &s, retry_config,
|
||||
timeout_millisec, renderer,
|
||||
tesseract_->tessedit_page_number);
|
||||
|
Loading…
Reference in New Issue
Block a user