LoadMetafile Method (original) (raw)

Summary

Loads the specified RTF file as a Windows Enhanced Metafile.

Example

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Core; [DllImport("Gdi32")] private static extern int DeleteEnhMetaFile(IntPtr hemf); public void LoadRtfAsMetafileExample() { RasterCodecs codecs = new RasterCodecs(); string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.rtf"); // Load the source file as a metafile IntPtr hemf = codecs.Options.Rtf.LoadMetafile(srcFileName, 1); if (hemf != IntPtr.Zero) { // Use the metafile here // Finally, delete it using the Windows API DeleteEnhMetaFile(hemf); } // Clean up codecs.Dispose(); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools.Codecs Assembly

CompactFile(Stream,Stream,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(Stream,Stream,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

CompactFile(string,string,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(string,string,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

StartCompress(int,int,int,RasterByteOrder,RasterViewPerspective,int,byte[],int,int,CodecsCompression,CodecsCompressDataCallback) Method