Represents the base class for classes that create an image by combining several grayscale images.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public class ChannelCombiner : PipelineElement
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:
The merging channels must be of the same dimensions and resolution.
The following code creates a CMYK image by combining 4 grayscale bitmaps (one bitmap per color channel):
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); }