---
title: "ChannelsProvider..::.AddAlpha Method (Single)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_ChannelsProvider_AddAlpha_1_7a94462e.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/)

# ChannelsProvider.AddAlpha Method (Single)
 
Appends alpha channel to current bitmap.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub AddAlpha ( _opacity As Single _
)
```
 
```csharp
public void AddAlpha(float opacity
)
```
 
### Parameters
 
 - opacity
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Opacity value to initialize alpha channel with. Valid values are in range [0, 1]. Depending on channel bit 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/gm5/P_Aurigma_GraphicsMill_Bitmap_HasAlpha.htm.md) property of the [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md).
 
## Examples
  
```
bitmap.Channels.AddAlpha(0.4F)
```
 
```csharp
bitmap.Channels.AddAlpha(0.4f);
```
   
## See Also

### Reference

- [ChannelsProvider Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ChannelsProvider.htm.md)
- [AddAlpha Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_ChannelsProvider_AddAlpha.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
