This function executes OCR on the image data specified by an image handle

[C++Builder/Visual C++]     BOOL IKOCRImageHandle(HANDLE ImageHandl, LPCTSTR language, LPCTSTR OcrTextFile);
[Delphi]         function IKOCRImageHandle(ImageHandl: THandle; language, OcrTextFile: LPCTSTR): LongBool; cdecl;
[Visual Basic]   Function IKOCRImageHandle(ByVal ImageHandl As Long, ByVal language As String, ByVal OcrTextFile As String) As Long

Parameters

Name Explanation
ImageHandl The image handle of the image to be converted to text
language The language used for text recognition during OCR. The setting value is a BCP-47 language tag (e.g., 'ja', 'en', 'zh', etc.).
OcrTextFile The text file into which the converted text data will be saved

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The IKOCRImageHandle function executes OCR on the image data specified by an image handle

When OCR is executed using IK10OCR.dll or IK10OCR64.dll, the OcrTextFile will be in UTF-8 format.
When OCR is executed using IK10OCRA.dll or IK10OCR64A.dll, the OcrTextFile will be in ANSI format.

Code Example

(1) C++Builder/Visual C++
   BOOL hr = IKOCRImageHandle(m_hImgHandle, _T("ja"), _T("OCRtextfile.txt"));

(2) Delphi
   var
      hr: LongBool;
   begin
      hr := IKOCRImageHandle(m_hImgHandle, 'ja', 'OCRtextfile.txt');
   end;

(3) Visual Basic
   Ret = IKOCRImageHandle(ImageHandle, "ja", "textfile.txt")

 

The ImageKit10 ActiveX is a product created by Newtone Corporation