# Image Export

With ActiveReports, you can render a report to different image formats such as BMP, GIF, JPEG, TIFF, and PNG. Learn more in documentation.

## Content

Image is the format that converts your report to an image file. You can use the [ImageRenderingExtension](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.ImageRenderingExtension.html) to render your report in this format. Make sure that you select an [ImageType](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) to any of the six different image formats available: BMP, GIF, JPEG, TIFF, and PNG.

>type=note
> **Note**: By default, the image rendering extension creates a separate file for each page in a report and adds an index to each corresponding file name (for example, image001.PNG, image002.PNG, etc).
> 
> To render the entire report as a single image, set the [Pagination](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) setting to **False**.

## Image Rendering Properties

ActiveReports offers several options to control how reports render to Image.

| Property | Description |
| -------- | ----------- |
| [Compression](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Sets or returns a value which specifies the compression to be used when exporting. |
| [Dither](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Specifies whether the image should be dithered when saving to a black and white output format, like CCITT3 or Rle. This property has no effect if the CompressionScheme property is set to Lzw or None(represents color output). |
| [DpiX](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Adjust the horizontal resolution of rendered images. The default value is 96. |
| [DpiY](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Adjust the vertical resolution of rendered images. |
| [ImageType](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Select the type of image to which you want to render the report. Supported types are BMP, GIF, JPEG, TIFF, and PNG. |
| [Pagination](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | By default, each page of a report is rendered as a separate image. Set this value to **False** to render the entire report as a single image. |
| [Quality](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Image/GrapeCity.ActiveReports.Export.Image.Page.Settings.html) | Gets or sets the quality of the report to be rendered as a JPEG image. |

## Export Report using Image Rendering Extension

Reports rendered as images do not support any of the interactive features of Active Reports. Any data hidden at the time of export is hidden in the image. To display all data in a drill-down report, expand all toggle items prior to exporting.

The following steps provide an example of rendering a report in Image format.

1. Create a new or open an existing Windows Forms App in Visual Studio project.
2. Go to the Project Explorer, right-click the project and select **Add** \> **New Item.**
3. Select **ActiveReports 20 Standalone Report** \> **Add** and choose a report type, **RDLX**, **RDLX Dashboard**, or **Page** report and then click **Finish**.
4. Add a reference to **MESCIUS.ActiveReports.Export.Image** package in the project.
5. On the Form.cs or Form.vb that opens, double-click the title bar to create the Form\_Load event.
6. Add the following code inside the Form\_Load event.

```vbnet
' Provide the Page report you want to render.

Dim rptPath As New IO.FileInfo("..\..\..\Report1.rdlx")

Dim pageReport As New GrapeCity.ActiveReports.PageReport(rptPath)

' Create an output directory.
Dim outputDirectory As New System.IO.DirectoryInfo("C:\MyImage")
outputDirectory.Create()

' Provide settings for your rendering output.
Dim imageSetting As New GrapeCity.ActiveReports.Export.Image.Page.Settings()
Dim setting As GrapeCity.ActiveReports.Extensibility.Rendering.ISettings = imageSetting

' Set the rendering extension and render the report.
Dim imageRenderingExtension As New GrapeCity.ActiveReports.Export.Image.Page.ImageRenderingExtension()
Dim outputProvider As New GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name))

' Overwrite output file if it already exists.
outputProvider.OverwriteOutputFile = True

pageReport.Document.Render(imageRenderingExtension, outputProvider, imageSetting)
```

```csharp
// Provide the Page report you want to render.
System.IO.FileInfo rptPath = new System.IO.FileInfo(@"..\..\..\Report1.rdlx");

GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(rptPath);// Create an output directory.
System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyImage");
outputDirectory.Create();

// Provide settings for your rendering output.
GrapeCity.ActiveReports.Export.Image.Page.Settings imageSetting = new GrapeCity.ActiveReports.Export.Image.Page.Settings();
GrapeCity.ActiveReports.Extensibility.Rendering.ISettings setting = imageSetting;

// Set the rendering extension and render the report.
GrapeCity.ActiveReports.Export.Image.Page.ImageRenderingExtension imageRenderingExtension = new GrapeCity.ActiveReports.Export.Image.Page.ImageRenderingExtension();
GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));

// Overwrite output file if it already exists.
outputProvider.OverwriteOutputFile = true;

pageReport.Document.Render(imageRenderingExtension, outputProvider, imageSetting);
```