# Saving Chart Images

## Content



The [C1Chart](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.C1Chart.html) provides the ability to create a single image of the entire chart as it is drawn on the screen or printer. By calling the [SaveImage](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.C1Chart.SaveImage.html) method, all of the items within the chart bounds can be saved to the clipboard, a byte array, a stream, or to an image file.

The [SaveImage](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.C1Chart.SaveImage.html) method can save to four different output types by using one of eight different overloaded parameter sets. For each output type, there is an option to save the chart image as it appears on the screen, or to save the chart image as a specified size.

To save the chart image to the clipboard, simply specify an image format, the size parameter is not specified here:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
C1Chart1.SaveImage(System.Drawing.Imaging.ImageFormat.Bmp)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
c1Chart1.SaveImage(System.Drawing.Imaging.ImageFormat.Bmp);
```

DOC-DETAILS-TAG-CLOSE

To save the chart image to an image file, simply specify the pathname for the new image and an image format, the size parameter is not specified here:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
C1Chart1.SaveImage("C:\temp\ChartImages\CandleChart.bmp",_
 System.Drawing.Imaging.ImageFormat.Bmp)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
c1Chart1.SaveImage("C:\\temp\\ChartImages\\CandleChart.bmp",
System.Drawing.Imaging.ImageFormat.Bmp);
```

DOC-DETAILS-TAG-CLOSE

To save the chart image to a stream, simply specify the stream object and an image format, the size parameter is not specified here:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Dim coutstream As New System.IO.MemoryStream()
C1Chart1.SaveImage(coutstream, System.Drawing.Imaging.ImageFormat.Bmp)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
System.IO.MemoryStream  coutstream = new System.IO.MemoryStream();
c1Chart1.SaveImage(coutstream, System.Drawing.Imaging.ImageFormat.Bmp);
```

DOC-DETAILS-TAG-CLOSE

To save the chart image as a byte array, simply specify the byte array, and an image format, the size parameter is not specified here:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Dim bytes() As Byte
C1Chart1.SaveImage(bytes, System.Drawing.Imaging.ImageFormat.Bmp)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
Byte[] bytes;
c1Chart1.SaveImage(bytes, System.Drawing.Imaging.ImageFormat.Bmp);
```

DOC-DETAILS-TAG-CLOSE

## See Also

[End-User Interaction](/componentone/docs/win/online-chart2d/enduserinteraction)