ImageSaveOptionsSaveFormat Property |
Namespace: Aspose.Words.Saving
On different platforms, the supported formats may be different. The number of other options depends on the selected format.
Also, it is possible to save to SVG both via ImageSaveOptions and via SvgSaveOptions.
Document doc = new Document(MyDir + "Rendering.docx"); // When saving the document as an image, we can use an ImageSaveOptions object to edit various aspects of it ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png) { ImageBrightness = 0.3f, // 0 - 1 scale, default at 0.5 ImageContrast = 0.7f, // 0 - 1 scale, default at 0.5 HorizontalResolution = 72f, // Default at 96.0 meaning 96dpi, image dimensions will be affected if we change resolution VerticalResolution = 72f, // Default at 96.0 meaning 96dpi Scale = 96f / 72f // Default at 1.0 for normal scale, can be used to negate resolution impact in image size }; doc.Save(ArtifactsDir + "ImageSaveOptions.EditImage.png", options);