提交 a027dca0 编写于 作者: S Stefan Weil

Extend URI support for Tesseract with libcurl

libcurl not only supports HTTP and HTTPS, but also a lot of other protocols,
for example FTP and SFTP. Those protocols can also be useful for Tesseract.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 1f437f3b
......@@ -1142,7 +1142,7 @@ bool TessBaseAPI::ProcessPagesInternal(const char *filename, const char *retry_c
if (stdInput) {
buf.assign((std::istreambuf_iterator<char>(std::cin)), (std::istreambuf_iterator<char>()));
data = reinterpret_cast<const l_uint8 *>(buf.data());
} else if (strncmp(filename, "http:", 5) == 0 || strncmp(filename, "https:", 6) == 0) {
} else if (strstr(filename, "://") != nullptr) {
// Get image or image list by URL.
#ifdef HAVE_LIBCURL
CURL *curl = curl_easy_init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册