将图片添加到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 sinceCreate
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 toCreate
. That should work out for you.