public static byte[] OCR(byte[] byteImages, string strLanguageFileName, int nFileFormat) { try { if (byteImages == null || byteImages.Length == 0) { throw new Exception("Image is not exist."); } return(DoOCR.OCR(byteImages, strLanguageFileName, nFileFormat)); } catch { throw new Exception("Failed to OCR");; } }
public static byte[] OCR(byte[] byteImages, string strLanguageFileName, int nFileFormat) { try { byte[] content = DoOCR.OCRInner(byteImages, strLanguageFileName, nFileFormat); if (content == null || content.Length == 0) { throw new Exception("Not Found literal."); } return(content); //return System.Text.Encoding.ASCII.GetString(content); } catch { throw new Exception("Failed to OCR."); } }