Merge image in C#

Powerful cross-platform .NET API for merging images using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms

Merge image to image using Aspose.Slides

Aspose.Slides for .NET is a powerful .NET library used to merge and manipulate presentations, images, and other files. When you merge image to image, you are effectively combining two images to get one picture.

Merge image to image in C#

Using Aspose.Slides for .NET , you can merge image files quickly with just a few lines of code

C# code for merging image to image

using (Presentation pres = new Presentation())
    IPPImage image = pres.Images.AddImage(File.ReadAllBytes("imagepath1"));
    pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, 360, 540, image);

    IPPImage image2 = pres.Images.AddImage(File.ReadAllBytes("imagepath2"));
    pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 360, 0, 360, 540, image2);

    pres.Slides[0].GetThumbnail(new Size(960, 720)).Save("merged-image.png", ImageFormat.Png);

How to merge images in C#

  1. Install Aspose.Slides for .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the images you want to merge as picture frames.

  5. Save the resulting image.

Merge PDF Files Online

How to Merge PDF in Python

Merge other files

You can also combine files in other formats to get a single file