C# TIFF Image Library
Merge TIFF File in C#.NET
How to Merge and Append TIFF Files in C# by Using RasterEdge XDoc.Tiff for .NET SDK
Merge and Append TIFF Files in C#.NET Overview
RasterEdge .NET Tiff processing SDK (XDoc.Tiff for .NET) provides C# developers and end-users with proven and reliable solutions for merging and appending Tiff files. Tiff files merging and appending capabilities can be integrated with your document management system. With RasterEdge image saving and printing support, users are able to save the new Tiff document efficiently and accurately.
Except for Tiff document merging and appending functions, RasterEdge .NET Tiff processing DLL can also be combined with users C#.NET applications to do Tiff file or page(s) rotating, reordering, splitting, deleting, etc, specific tutorials for main functions are listed below.
Mature solution in C# to add new blank Tiff page
Mature solution in C# to rotate Tiff page
Mature solution in C# to remove and delete Tiff page
Mature solution in C# to reorder Tiff pages
Mature solution in C# to split Tiff file
C# Project DLLs: Merge TIFF File
In order to run the following conversion code, please do as follows:
Merge Two Tiff Image Files in C# Project
You can load two Tiff images, merge them, and create a new Tiff image file.
// Define Tiff image files.
string[] tifFiles = new string[] { @"C:\demo1.tif", @"C:\demo2.tif" };
// Merge these Tiff files to a single Tiff file and save it to output.tif.
TIFFDocument.CombineDocument(tifFiles, @"C:\output.tif");
|
Append Two Tiff Image Files in C# Project
In addition to Tiff file merging, you can also append one Tiff image to the end of another one. For instance, this example shows how to append demo2.tif to the end of demo1.tif.
// Load Tiff image files.
TIFFDocument doc1 = new TIFFDocument(@"C:\demo1.tif");
TIFFDocument doc2 = new TIFFDocument(@"C:\demo2.tif");
if (null == doc1 || null == doc2)
throw new Exception("Fail to load TIFF Document, pls check file path or others.");
// Append demo2.tif to the end of demo1.tif.
doc1.AppendDocument(doc2);
doc1.Save(@"C:\append.tif");
|
Related API(s) (TIFFDocument.cs):
public static void CombineDocument(Stream[] sourceFiles, string outFile)Description:
Combine multiple TIFF files into one, and save it to the specified file path.
Parameters:
public static void CombineDocument(string[] sourceFiles, Stream stream)Description:
Combine multiple TIFF files into one, and save it to the specified stream
Parameters:
public static void CombineDocument(Stream[] sourceFiles, Stream stream)Description:
Combine multiple TIFF files into one, and save it to the specified stream
Parameters:
public static void CombineDocument(string[] sourceFiles, string destn)Description:
Combine multiple TIFF files into one, and save it to the specified file path
Parameters:
public override int AppendDocument(BaseDocument appendDoc)Description:
Append new TIFF file to the original one.
Parameters: