This method combines tiff files contained in a specified folder and saves them as a single multipage tiff file.

[Visual Basic] Public Function MergeTiffImages(Directory As String, Append As Boolean) As Boolean
[C#] public bool MergeTiffImages(string Directory, bool Append);

Parameters

Directory
     The name of the folder containing the image files to be combined (full path)

Append
     Sets whether or not existing files will be appended or overwritten

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The MergeTiffImages method combines tiff files contained in a specified folder and saves them as a single multipage tiff file.

The Directory parameter sets the folder where the tiff files reside. The FileName property sets the name of the multipage tiff file that is created. The order of the pages of the created multipage tiff file is determined by the order of the filenames of the individual tiff files contained in the Directory folder.

If the file set in the FileName property is an existing file, then if the Append parameter is true, the newly created multipage tiff file will be appended to this existing file. If the Append parameter is false, then a new file is created by overwriting the existing file.

Only images in tiff format that exist in the Directory folder be merged and saved. The tiff compression format or each tiff image will be preserved in the multipage tiff image that is created. The tiff compression formats will not be changed.

The types of tiff images that can be saved are based on the types listed in the Newtone.ImageKit.SaveFileType enumeration.

If non-tiff images exist in the specified folder, an error is not generated. Those non-tiff images will be skipped and not included in the multipage tiff file that is created.

If the specified folderhas subfolders, the tiff images in these subfolders will also be merged into the multipage tiff file.

If a multipage tiff file exists in the specified folder, each page of this multipage tiff image will be included and saved along with any other individual tiff images contained in the folder.

Also See

ImageKit.File Members | Newtone.ImageKit.Wpf.ImageKit

The ImageKit WPF is created by Newtone Corporation