How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Merge Images
Merge Images
  |  
Home ›› XImage.Raster ›› C# Raster: Merge Images

How to C#: Merge Images


Overview for How to Merge Images



Related .net document control helps:
asp.net create pdf using c#: ASP.NET Create PDF Document Control: create, convert PDF file from Word, Excel, Tiff file formats in C# ASP.NET
c# asp.net webforms document viewer: ASP.NET WebForms application document viewer control: view, annotate, redact, convert files online in ASP.NET
c# asp.net tiff document viewer: ASP.NET Tiff Document Viewer: view, annotate Tiff files in HTML using C# Control
asp.net webforms pdf editor using c#: ASP.NET WebForms PDF Editor: create, view, edit, annotate, redact PDF file in ASP.NET WebForms application
c# asp.net iis document viewer: C# HTML5 Viewer: Deployment on IIS
c# asp.net document annotation: ASP.NET Document Annotation Control: text comment, drawing on files online using ASP.NET component
asp.net open pdf password using c#: ASP.NET PDF Password Edit Control: online add, remove, update PDF file open password using C#


Overview



By using the XImage.Raster SDK, you can merge images with different merge type.




Steps to Merge Images



Load an image with RasterImage object.


Create an image processor with ImageProcess object.


Call the MergeImage method of ImageProcess object to complete the task flopping image.


Save the modified image to an image file on the disk.


In order to acheive the work, please refer to the following steps.




Install XImage.Raster in C# Project



Add necessary references to your C#.NET project. Right-click the project and select "Add Reference..." to locate and add the following DLLs as project references;


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use corresponding namespaces;


  using RasterEdge.XImage.Raster;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.




Merge Images



Sample Code (merge image):




RasterImage img = new RasterImage(@"F:\input.png");
RasterImage child = new RasterImage(@"F:\input1.png");
ImageProcess process = new ImageProcess(img);
//paste the child image on the img, and the xoffset = 50, yoffset = 100.
process.MergeImage(child, MergeType.Blend, 50, 100);
img.Save(@"C:\output.tif">);