---
title: "PngWriter.CompressionLevel Property "
canonical: https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_PngWriter_CompressionLevel.htm
product: "Graphics Mill"
---

# PngWriter.CompressionLevel Property 
 
Gets or sets a value indicating the compression level for underlying zlib.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public int CompressionLevel { get; set; }
```
 
### Property Value
The compression level in the range `[-2, 9]`. The default value is `-1`.
 
## Remarks
  
|  Compression Level |  Description |
| --- | --- |
 |  **`-2`** |  The fastest compression level powered by Intel IPP. |
 |  **`-1`** |  The value corresponding to an average compression time. This is the default value. |
 |  **`0`** |  The value that does not apply compression. |
 
For values from `1` to `9`, the lower the level, the less time it takes to compress the image and the bigger file is obtained.
   
## See Also

### Reference

- [PngWriter Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_PngWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
