---
title: "Jpeg2kEncoderOptions..::.Compression Property "
canonical: https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_Jpeg2kEncoderOptions_Compression.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Jpeg2kEncoderOptions.Compression Property 
 
Gets/sets a value that specifies a JPEG2000 compression type.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Property Compression As CompressionType
```
 
```csharp
public CompressionType Compression { get; set; }
```
 
### Property Value
 
A member of [CompressionType](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) enumeration which specifies a type of the JPEG2000 compression.
 
**Note** 
Only [WaveletLossless](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) and [WaveletLossy](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) values are supported.
 
## Remarks
  
If the compression type is [WaveletLossy](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md), you can specify the ratio of the compression using the [Rate](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_Jpeg2kEncoderOptions_Rate.htm.md) property. For [WaveletLossy](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) this property is ignored.
   
## See Also

### Reference

- [Jpeg2kEncoderOptions Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Jpeg2kEncoderOptions.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
