/// <summary> /// Gets the text from the image in UTF-8 format /// </summary> /// <returns>UTF-8 Text</returns> public string GetText() { Debug.Assert(m_Handle != IntPtr.Zero, "Handle must not be nulled!"); if(m_Handle != IntPtr.Zero) { IntPtr textPtr = TesseractOCRBridge.GetTextData(m_Handle); Debug.Assert(textPtr != IntPtr.Zero, "Text must not be nulled!"); if(textPtr != IntPtr.Zero) { return Marshal.PtrToStringAnsi(textPtr); } } return ""; }