ChartToImage Method (Stream, ImageFormat)

Creates the chart image and saves it to a stream in the specified format.

Namespace:  Aspose.Cells.Charts
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 21.5.0.0 (21.5)
Syntax
public void ToImage(
	Stream stream,
	ImageFormat imageFormat
)

Parameters

stream
Type: System.IOStream
The output stream.
imageFormat
Type: System.Drawing.ImagingImageFormat
The format in which to save the image.
Remarks

The format of the image is specified by using imageFormat. The following formats are supported: ImageFormat.Bmp, ImageFormat.Gif, ImageFormat.Png, ImageFormat.Jpeg, ImageFormat.Tiff, ImageFormat.Emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. Please refer Supported Charts List for more details.
See Also