# SaveSettings.ImageCompressionQuality Property

> Sets a value between 1 and 100, which is the quality of a lossy image compression used when a document is saved. It is used for all images in the document the data of which is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. A value of zero selects a compression specific default value. For a single image the value of this property can be overwritten using the Image.ExportCompressionQuality property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 11.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl > SaveSettings.ImageCompressionQuality Property
- **579 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/imagecompressionquality-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/imagecompressionquality-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/imagecompressionquality-property/llms-full.txt

---

### Description

Sets a value between 1 and 100, which is the quality of a lossy image compression used when a document is saved. It is used for all images in the document the data of which is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. A value of zero selects a compression specific default value. For a single image the value of this property can be overwritten using the [Image.ExportCompressionQuality](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/exportcompressionquality-property/llms-full.txt) property.

### Syntax

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

```vbnet
Public Property ImageCompressionQuality As Integer
```

### Examples

The following example configures how the current document is exported to WordprocessingML by using `SaveSettings.ImageCompressionQuality`.

```csharp
textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();

saveSettings.ImageCompressionQuality = 10;
Console.WriteLine($"Image Compression Quality used by Save Settings: {saveSettings.ImageCompressionQuality}");

textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);
```

```vbnet
textControl.Text = "Quarterly results"
Dim saveSettings As New SaveSettings()

saveSettings.ImageCompressionQuality = 10
Console.WriteLine($"Image Compression Quality used by Save Settings: {saveSettings.ImageCompressionQuality}")

textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings)
```

---

## Nearby

- **Previous:** [SaveSettings.DocumentTitle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/documenttitle-property/llms-full.txt)
- **Next:** [SaveSettings.ImageExportFilterIndex Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/imageexportfilterindex-property/llms-full.txt)
