将图片添加到MODI [英] Add image to MODI

查看:92
本文介绍了将图片添加到MODI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码:

<-我有一张图片-!>

Code:

<-- I have an Image --!>

Image _Image = null;
_Image = DownloadImage(strUrl, cc);



//Instantiate the MODI.Document object 
MODI.Document md = new MODI.Document(); 


====================================
例如:
md.Create(_image)// this code error
====================================


======================================
example:
md.Create(_image)// this code error
======================================

//The Create method grabs the picture from disk snd prepares for OCR.           
md.Create("C:\\bmp.gif"); //but I don't want to read from disk
//Do the OCR.
md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true); 
//Get the first (and only image) 
MODI.Image image = (MODI.Image)md.Images[0]; 
//Get the layout. 
MODI.Layout layout = image.Layout; 



请帮我?或有什么主意吗?

问候,



please help me? or any idea?

regards,

推荐答案

很抱歉,您不能这样做,因为Create 期望文件路径.您可以做的是将内存映像保存到一个临时文件,然后将该临时文件的路径传递到Create.那应该为您解决.
I am sorry but you cannot do that since Create expects a file path. What you can do is to save your in-memory image to a temporary file, and then pass the path to this temporary file to Create. That should work out for you.


这篇关于将图片添加到MODI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆