---
title: "PerChannelBitmapTransform..::.ApplyMaskTransform Method (Bitmap, Bitmap, Bitmap)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform_ApplyMaskTransform_3_523ca0ef.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/)

# PerChannelBitmapTransform.ApplyMaskTransform Method (Bitmap, Bitmap, Bitmap)
 
Produces transformed copy of given bitmap (which remains unchanged) using specified mask.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Overrides Sub ApplyMaskTransform ( _source As Bitmap, _mask As Bitmap, _destination As Bitmap _
)
```
 
```csharp
public override void ApplyMaskTransform(Bitmap source,Bitmap mask,Bitmap destination
)
```
 
### Parameters
 
 - source
     - Type: [Aurigma.GraphicsMill.Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
Input [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md). It is not modified with the transform algorithm.

 - mask
     - Type: [Aurigma.GraphicsMill.Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
 [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) which defines mask. Mask should be 8-bit grayscale bitmap (its pixel format is [Format8bppGrayScale](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_PixelFormat.htm.md)) of the same dimensions as original image.

 - destination
     - Type: [Aurigma.GraphicsMill.Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
Output [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md). It should be instantiated before passing to this method. After transform algorithm completes, all data loaded to this bitmap is discarded and result is copied here.
   
## See Also

### Reference

- [PerChannelBitmapTransform Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform.htm.md)
- [ApplyMaskTransform Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform_ApplyMaskTransform.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
