ImageSaveOptionsSaveFormat Property

Specifies the format in which the rendered document pages or shapes will be saved if this save options object is used. Can be a raster Tiff, Png, Bmp, Jpeg or vector Emf, Svg.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public override SaveFormat SaveFormat { get; set; }

Property Value

Type: SaveFormat
Remarks

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.

Examples
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);
See Also