# Image.ExportCompressionQuality Property

> Sets a value between 1 and 100, which is the quality of a lossy data compression used if this image is saved. It is only used if the image data is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. If this property is set to zero, which is the default value, Text Control uses the quality value set with the SaveSettings.ImageCompressionQuality property or a compression specific default value.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 11.0
- **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.ExportCompressionQuality Property
- **637 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportcompressionquality-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportcompressionquality-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/image/exportcompressionquality-property/llms-full.txt

---

### Description

Sets a value between 1 and 100, which is the quality of a lossy data compression used if this image is saved. It is only used if the image data is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. If this property is set to zero, which is the default value, Text Control uses the quality value set with the [SaveSettings.ImageCompressionQuality](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imagecompressionquality-property/llms-full.txt) property or a compression specific default value.

### Syntax

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

```vbnet
Public Property ExportCompressionQuality As Integer
```

### Examples

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

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

image.ExportCompressionQuality = 90;
Console.WriteLine($"Export Compression Quality used by Image: {image.ExportCompressionQuality}");

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.ExportCompressionQuality = 90
Console.WriteLine($"Export Compression Quality used by Image: {image.ExportCompressionQuality}")

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

---

## Nearby

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