---
title: "ChannelsProvider.SetAlpha Method (Single)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ChannelsProvider_SetAlpha_1_7a94462e.htm
product: "Graphics Mill"
---

# ChannelsProvider.SetAlpha Method (Single)
 
Sets 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(float opacity
)
```
 
### Parameters
 
 - opacity
     - Type: System.Single
The opacity (in range `[0, 1]`) to initialize the alpha channel with. Depending on the channel color depth this value is normalized to 255 (for non-extended 8 bits per channel pixel formats) or to 65535 (for extended 16 bits per channel pixel formats).
 
## 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)
