当前位置: 首页>>代码示例>>C#>>正文


C# IEngine.LoadImageDocFromMemory方法代码示例

本文整理汇总了C#中IEngine.LoadImageDocFromMemory方法的典型用法代码示例。如果您正苦于以下问题:C# IEngine.LoadImageDocFromMemory方法的具体用法?C# IEngine.LoadImageDocFromMemory怎么用?C# IEngine.LoadImageDocFromMemory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEngine的用法示例。


在下文中一共展示了IEngine.LoadImageDocFromMemory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: How_to_pass_images_between_processes_or_to_and_from_FineReader_Engine

        // HOW-TO: How to pass images between processes or to and from FineReader Engine
        public static void How_to_pass_images_between_processes_or_to_and_from_FineReader_Engine( IEngine engine )
        {
            trace( "Prepare an image in FlexiCapture Engine format..." );
            IDocument document = PrepareNewRecognizedDocument( engine );
            IImageDocument pageImageDocument = document.Pages[0].ReadOnlyImage;

            trace( "Serialize the image document in memory..." );
            // You are responsible for freeing the allocated memory when it is no longer needed
            int hGlobal = pageImageDocument.SaveImageDocToMemory();
            try {
                // The handle to the serialized image can be used in the same process (for example for
                // interoperability with FineReader Engine) or passed (marshalled) to a different process if required

                trace( "Deserialize the image document from memory..." );
                // To deserialize the image in the target context use LoadImageDocFromMemory method.
                // An identical method is present in FineReader Engine which can be used to convert
                // images to FREngine format
                IImageDocument documentCopy = engine.LoadImageDocFromMemory( hGlobal );

            } finally {
                // Do not forget to free the memory. The memory can be freed either in the same process where
                // it was allocated or in the process where the image is consumed
                trace( "Free the memory..." );
                Kernel32.GlobalFree( (IntPtr)hGlobal );
            }
        }
开发者ID:DominatorCode,项目名称:FlexiCapture-Code-Snippets--C--,代码行数:27,代码来源:Frequently+asked+questions.cs


注:本文中的IEngine.LoadImageDocFromMemory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。