ImageSaveOptionsImageBrightness Property |
Namespace: Aspose.Words.Saving
This property has effect only when saving to raster image formats.
The default value is 0.5. The value must be in the range between 0 and 1.
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);