Esempio n. 1
0
 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");;
     }
 }
Esempio n. 2
0
        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.");
            }
        }