调整中晶导出ocr错误返回值
This commit is contained in:
parent
b5aeace56e
commit
05c0b539b4
|
@ -116,8 +116,12 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
|
|||
|
||||
HGImgFmt_CloseImageWriter(writer);
|
||||
|
||||
createOcrPdf(tmpFileName, getStdString(fileName).c_str());
|
||||
bool result = createOcrPdf(tmpFileName, getStdString(fileName).c_str());
|
||||
QFile::remove(tmpFileName);
|
||||
if (!result)
|
||||
{
|
||||
ret = HGIMGPROC_ERR_OCR;
|
||||
}
|
||||
#else
|
||||
HGOCRMgr ocrMgr = nullptr;
|
||||
ret = HGImgProc_CreateOCRMgr(0, &ocrMgr);
|
||||
|
|
|
@ -433,9 +433,9 @@ HGResult MainWindow::saveImage(HGImage image, const HGImgFmtSaveInfo* info, bool
|
|||
HGChar tmpFileName[256];
|
||||
HGBase_GetTmpFileName("bmp", tmpFileName, 256);
|
||||
ret = HGImgFmt_SaveImage(image, 0, info, tmpFileName);
|
||||
createOcrPdf(tmpFileName, fileName);
|
||||
bool result = createOcrPdf(tmpFileName, fileName);
|
||||
QFile::remove(tmpFileName);
|
||||
return ret;
|
||||
return (result) ? HGBASE_ERR_OK : HGIMGPROC_ERR_OCR;
|
||||
#else
|
||||
// 韫囩晫鏆恑nfo
|
||||
HGOCRMgr ocrMgr = nullptr;
|
||||
|
|
Loading…
Reference in New Issue