# Image.ExportFilterIndex Property

> Gets or sets the format used if an image is saved. This is the number of the filter in the string returned through the ImageCollection.ExportFilters property, beginning with number one. If the ImageCollection.ExportFilters property is used to initialize the FileDialog.Filter property of a Framework dialog, the FileDialog.FilterIndex property can be used as value for this property. A value of zero indicates that no export format has currently be specified for the image. In this case the original format is used that can be obtained with the Image.FilterIndex property. The technical article Loading and Saving Images describes how images can be loaded and saved.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > Image.ExportFilterIndex Property
- **842 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportfilterindex-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportfilterindex-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportfilterindex-property/llms-full.txt

---

### Description

Gets or sets the format used if an image is saved. This is the number of the filter in the string returned through the [ImageCollection.ExportFilters](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/imagecollection/exportfilters-property/llms-full.txt) property, beginning with number one. If the [ImageCollection.ExportFilters](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/imagecollection/exportfilters-property/llms-full.txt) property is used to initialize the `FileDialog.Filter` property of a Framework dialog, the `FileDialog.FilterIndex` property can be used as value for this property. A value of zero indicates that no export format has currently be specified for the image. In this case the original format is used that can be obtained with the [Image.FilterIndex](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/filterindex-property/llms-full.txt) property. The technical article Loading and Saving Images describes how images can be loaded and saved.

### Syntax

```csharp
public int ExportFilterIndex { get; set; }
```

```vbnet
Public Property ExportFilterIndex As Integer
```

### Members

| Value | Description |
|---|---|
| 1 | Windows Bitmap (.BMP) |
| 2 | Windows Metafile (.WMF) |
| 3 | Portable Network Graphics (.PNG) |
| 4 | JPEG File Interchange Format (.JPG, .JPEG) |
| 5 | Windows Enhanced Metafile (.EMF) |
| 6 | Tagged Image Format (.TIF) |
| 7 | Graphics Interchange Format (.GIF) |

### Examples

The following example inserts and configures a named, accessible company logo by using `Image.ExportFilterIndex`.

```csharp
TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);

image.ExportFilterIndex = 1;
Console.WriteLine($"Export Filter Index used by Image: {image.ExportFilterIndex}");

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML);
```

```vbnet
Dim image As New TXTextControl.Image() With { .FileName = "Images\company-logo.png", .Name = "CompanyLogo" }
textControl.Images.Add(image, -1)

image.ExportFilterIndex = 1
Console.WriteLine($"Export Filter Index used by Image: {image.ExportFilterIndex}")

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML)
```

---

## Nearby

- **Previous:** [Image.ExportFileName Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportfilename-property/llms-full.txt)
- **Next:** [Image.ExportMaxResolution Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportmaxresolution-property/llms-full.txt)
