---
title: "SwapChannels Constructor (array&lt;Int32&gt;[]()[])"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Transforms_SwapChannels_ctor_1_c811944e.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/)

# SwapChannels Constructor (Int32[])
 
Creates and initializes [SwapChannels](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_SwapChannels.htm.md) class instance.
 
**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 Sub New ( _channels As Integer() _
)
```
 
```csharp
public SwapChannels(int[] channels
)
```
 
### Parameters
 
 - channels
     - Type:  [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d) []
An array of channel indices sorted in the necessary order. E.g. if you need to swap blue and green channel in RGB bitmap, this array will be looking in the following way: (1, 0, 2). If this array entries are sorted in ascending order, transform will do nothing. You can change it later through [ChannelsOrder](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_SwapChannels_ChannelsOrder.htm.md) property.
   
## See Also

### Reference

- [SwapChannels Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_SwapChannels.htm.md)
- [SwapChannels Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Transforms_SwapChannels_ctor.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
