---
title: "BmpWriter.Compression Property "
canonical: https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_BmpWriter_Compression.htm
product: "Graphics Mill"
---

# BmpWriter.Compression Property 
 
Gets or sets a BMP compression type.
 
**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 CompressionType Compression { get; set; }
```
 
### Property Value
A [CompressionType](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) to write the image with. The default value is [None](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md).
 
## Remarks
  
BMP format has a very limited compression support. The table below specifies what compression types are supported by this format:
 
|  Compression Type |  Limitations |
| --- | --- |
 |  **[None](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md)** |  No limitations. Supported with all pixel formats allowed for BMP files. |
 |  **[Rle](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md)** |  Can be used only if the bitmap has 4 or 8 bits per pixel ([PixelFormat](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_PixelFormat.htm.md) is [Format4bppIndexed](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_PixelFormat_Format4bppIndexed.htm.md), [Format8bppIndexed](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_PixelFormat_Format8bppIndexed.htm.md), or [Format8bppGrayscale](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_PixelFormat_Format8bppGrayscale.htm.md)). |
   
## See Also

### Reference

- [BmpWriter Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_BmpWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
