---
title: "ChannelCombiner Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ChannelCombiner.htm
product: "Graphics Mill"
---

# ChannelCombiner Class
 
Represents the base class for classes that create an image by combining several grayscale images.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public class ChannelCombiner : PipelineElement
```
 
## Remarks
  
Merging channels into a single image allows the creating of color images by combining several grayscale images. It is useful when, for example, you have 4 grayscale bitmaps prepared for printing (cyan, magenta, yellow, and black) and you need to make a color preview of the resulting image. The easiest way to merge channels into one image is to use one of the following descendant classes:
 
- [RgbChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_RgbChannelCombiner.htm.md) is specified to work with RGB images.
- [CmykChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_CmykChannelCombiner.htm.md) is specified to work with CMYK images.
- [GrayscaleChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_GrayscaleChannelCombiner.htm.md) is specified to work with grayscale images containing the alpha channel.

**Note** 
The merging channels must be of the same dimensions and resolution.
 
## Examples
  
The following code creates a CMYK image by combining 4 grayscale bitmaps (one bitmap per color channel):
 
```csharp
using (var combiner = new CmykChannelCombiner())
using (var writer = new TiffWriter(@"Images\Output\Cmyk_test_combined.tif"))
{
    combiner.C = new TiffReader(@"Images\Cmyk_test_Channel_C.tif");
    combiner.M = new TiffReader(@"Images\Cmyk_test_Channel_M.tif");
    combiner.Y = new TiffReader(@"Images\Cmyk_test_Channel_Y.tif");
    combiner.K = new TiffReader(@"Images\Cmyk_test_Channel_K.tif");
    combiner.AutoDisposeSources = true;
    Pipeline.Run(combiner + writer);
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - Aurigma.GraphicsMill.ChannelCombiner
            - [Aurigma.GraphicsMill.RgbChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_RgbChannelCombiner.htm.md)
            - [Aurigma.GraphicsMill.CmykChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_CmykChannelCombiner.htm.md)
            - [Aurigma.GraphicsMill.GrayscaleChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_GrayscaleChannelCombiner.htm.md)
            - [Aurigma.GraphicsMill.LabChannelCombiner](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_LabChannelCombiner.htm.md)
 
## 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

- [ChannelCombiner Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_ChannelCombiner.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)

### Manual

- [Reading and Writing Channels](https://www.graphicsmill.com/docs/gm/reading-and-writing-channels.htm.md)
