---
title: "SetAlpha Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_SetAlpha.htm
product: "Graphics Mill"
---

# SetAlpha Class
 
Sets the alpha channel to an image.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class SetAlpha : MaskTransform
```
 
## Examples
  
```csharp
using (var alpha = new SetAlpha())
{
    alpha.AlphaSource = ImageReader.Create(@"Images\alpha.png");
    alpha.AutoDisposeAlphaSource = true;

    Pipeline.Run(@"Images\in.jpg" + alpha + @"Images\Output\out.png");
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Transforms.Transform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Transform.htm.md)
            - [Aurigma.GraphicsMill.Transforms.MaskTransform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_MaskTransform.htm.md)
                - Aurigma.GraphicsMill.Transforms.SetAlpha
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [SetAlpha Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_SetAlpha.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
