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: (22.1)
public void ToImage(
	Stream stream,
	ImageFormat imageFormat


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

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