# Save BarCode as Image

Learn how to save barcode as images.

## Content



The BarCode control supports the export to image format functionality. You can save the image of the BarCode and use it for other purposes, like copy the image to clipboard, assign the image to a picture control or utilize the image in office productivity applications like Microsoft Office, WordPad etc. The <span data-popup-content="This class is available in both \u003ca href=\u0022/componentone/api/wpf/online-barcode/dotnet-api/C1.WPF.BarCode/C1.WPF.BarCode.C1BarCode.html\u0022\u003e.NET\u003c/a\u003e and .\u003ca href=\u0022/componentone/api/wpf/online-barcode/dotnet-api/C1.WPF.BarCode/C1.WPF.BarCode.C1BarCode.html\u0022\u003eNET Framework\u003c/a\u003e." data-popup-title="C1BarCode" data-popup-theme="ui-tooltip-green qtip-green">C1BarCode</span> class provides the [Save(System.IO.Stream stream, C1.WPF.BarCode.ImageFormat imgFormat)](/componentone/api/wpf/online-barcode/dotnet-api/C1.WPF.BarCode/C1.WPF.BarCode.C1BarCode.Save.html) method that can be used to save the image of the barcode in image formats such as BMP, PNG and JPEG. The <span data-popup-content="This method is available in \u003ca href=\u0022/componentone/api/wpf/online-barcode/dotnet-api/C1.WPF.BarCode/C1.WPF.BarCode.C1BarCode.Save.html\u0022\u003e.NET\u003c/a\u003e and .\u003ca href=\u0022/componentone/api/wpf/online-barcode/dotnet-api/C1.WPF.BarCode/C1.WPF.BarCode.C1BarCode.Save.html\u0022\u003eNET framework\u003c/a\u003e." data-popup-title="Save" data-popup-theme="ui-tooltip-green qtip-green">Save</span> method accepts two parameters, **stream**, where the barcode will be saved, and **imgFormat**, which stands for the format of the barcode image.

```csharp
barCode.Save(stream, (ImageFormat)Enum.Parse(typeof(ImageFormat), fileExtension, true));
stream.WriteTo(fstream);
```