---
title: "Combiner Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Combiner.htm
product: "Graphics Mill"
---

# Combiner Class
 
Combines two images using the specified mode.
 
**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 Combiner : MaskTransform
```
 
## Remarks
  
Images can be combined in the different way: just copying pixels from one image to another, alpha blending, bitwise operations, etc. You can adjust it with [Mode](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Combiner_Mode.htm.md) property.
 
## Examples
  
The following code creates a collage from the two photos, given mask and background images:
 
```csharp
using (var photo1 = new Bitmap(@"Images\monkey.jpg"))
using (var photo2 = new Bitmap(@"Images\dog.jpg"))
using (var background = new Bitmap(@"Images\CollageBackground.jpg"))
using (var mask = new Bitmap(@"Images\CollageMask.jpg"))
{
    //Resulting collage.
    var collage = new Bitmap();

    //Coordinates of placeholders.
    var point1 = new System.Drawing.Point(130, 165);
    var point2 = new System.Drawing.Point(460, 200);

    //Create the transform.
    var combiner = new Combiner(CombineMode.Copy);

    //Combine with the first image.
    combiner.TopImage = photo1;
    combiner.X = point1.X - photo1.Width / 2;
    combiner.Y = point1.Y - photo1.Height / 2;
    collage = combiner.ApplyMaskTransform(background, mask);

    //Combine with the second image.
    combiner.TopImage = photo2;
    combiner.X = point2.X - photo2.Width / 2;
    combiner.Y = point2.Y - photo2.Height / 2;
    collage = combiner.ApplyMaskTransform(collage, mask);

    collage.Save(@"Images\Output\collage.jpg");

    collage.Dispose();
}
```
 
## 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.Combiner
 
## 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

- [Combiner Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_Combiner.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)

### Manual

- [Combine Modes](https://www.graphicsmill.com/docs/gm/combine-modes.htm.md)
- [Overlaying Images](https://www.graphicsmill.com/docs/gm/overlaying-images.htm.md)
