---
title: "ChannelsProvider.SetAlpha Method (Bitmap)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ChannelsProvider_SetAlpha_1_fd4033ef.htm
product: "Graphics Mill"
---

# ChannelsProvider.SetAlpha Method (Bitmap)
 
Sets the specified [Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md) as the alpha channel to the current bitmap.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void SetAlpha(Bitmap alpha
)
```
 
### Parameters
 
 - alpha
     - Type: [Aurigma.GraphicsMill.Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md)
A grayscale [Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md) to initialize alpha channel with. The bitmap should have the same dimensions and color depth as the current bitmap.
 
## Remarks
 If alpha channel is already presented in the bitmap, this method will throw an exception. To check if alpha channel is available, use [HasAlpha](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_HasAlpha.htm.md) property of the [Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md) class.
   
## See Also

### Reference

- [ChannelsProvider Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ChannelsProvider.htm.md)
- [SetAlpha Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_ChannelsProvider_SetAlpha.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
