Код: Выделить всё
private void button1_Click( object sender, EventArgs e )
{
string inputFile = @"C:\testImage.bmp";
textBox1.Text = GetTextFromImage( inputFile );
}
private string GetTextFromImage( string fileName )
{
string output = "";
var doc1 = new MODI.Document();
doc1.Create( fileName );
doc1.OCR( MiLANGUAGES.miLANG_ENGLISH, false, false );
for ( int i = 0; i < doc1.Images.Count; i++ )
{
output += doc1.Images[i].Layout.Text;
}
doc1.Close();
return output;
}
Код: Выделить всё
System.Runtime.InteropServices.COMException was unhandledMessage=OCR running error Source="" ErrorCode=-959967087
Код: Выделить всё
2338Есть ли у кого-нибудь совет, что делать дальше?
Подробнее здесь: https://stackoverflow.com/questions/669 ... th-c-sharp
Мобильная версия