ImageSaveOptionsMetafileRenderingOptions Property |
Namespace: Aspose.Words.Saving
When Vector is specified, Aspose.Words renders metafile to vector graphics using its own metafile rendering engine first and then renders vector graphics to the image.
When Bitmap is specified, Aspose.Words renders metafile directly to the image using the GDI+ metafile rendering engine.
GDI+ metafile rendering engine works faster, supports almost all metafile features but on low resolutions may produce inconsistent result when compared to the rest of vector graphics (especially for text) on the page. Aspose.Words metafile rendering engine will produce more consistent result even on low resolutions but works slower and may inaccurately render complex metafiles.
The default value for MetafileRenderingMode is Bitmap.
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Use a DocumentBuilder to insert a .wmf image into the document builder.InsertImage(Image.FromFile(ImageDir + "Windows MetaFile.wmf")); // For documents that contain .wmf images, when converting the documents themselves to images, // we can use a ImageSaveOptions object to designate a rendering method for the .wmf images ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png); options.MetafileRenderingOptions.RenderingMode = MetafileRenderingMode.Bitmap; doc.Save(ArtifactsDir + "ImageSaveOptions.WindowsMetaFile.png", options);