---
title: "ChannelsProvider.SwapChannels Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ChannelsProvider_SwapChannels_1_a56295c4.htm
product: "Graphics Mill"
---

# ChannelsProvider.SwapChannels Method 
 
Swaps channels.
 
**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 SwapChannels(int[] channels
)
```
 
### Parameters
 
 - channels
     - Type: System.Int32[]
An array of channel indices sorted in the necessary order. E.g. if you need to swap blue and green channel in an RGB bitmap, this array should contain: `(1, 0, 2)`.
 
## Remarks
 If number of indices in *channels* argument is less than number of channels in the current bitmap, the rest channels will be unchanged. If there are more indices than current bitmap provides, all extra indices will be ignored.
 
## Examples
  
```csharp
bitmap.Channels.SwapChannels(new int[] { 1, 0, 2 });
```
   
## See Also

### Reference

- [ChannelsProvider Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ChannelsProvider.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
