Plans | Login    

Briefing Search
Keyword:
Category:

       

    
Author Details
zarfishan zahid
seo@aspose.com
aspose.com

C and VB.NET Code Examples for Concatenating Multiple Tiff Images


This technical tip allows users to concatenate multiple tiff images using C and VB.NET code.

BriefingWire.com, 9/04/2013 - This Technical tip explains how to concatenate multiple TIFF images using Aspose.Imaging for .NET. Sometimes you need to concatenate a TIFF Image into another TIFF image and Aspose.Imaging supports this feature of concatenating multiple Tiff images. This article exhibits the TIFF image concatenation feature of Aspose.Imaging for .Net API. We will use TiffImage and TiffFrame classes to concatenate multiple TIFF images. We can use both standard methods, from file and from stream, to concatenate TIFF images. First, we will create a copy of the destination image to avoid any alteration to original image. Source images could be concatenated directly to the original destination image; it’s depending upon the requirement. Then we will create instances of images and load images from local disk. Now we will copy the active frame of source image using CopyFrame method of TiffFrame class and add that copied frame in destination image with the help of AddFrame method of TIffImage class. Finally we will save image back to local disk.

[C#]

//Create a copy of original image to avoid any alteration

File.Copy(MyDir + "sample.tif", MyDir + "Testconct.tif", true);

//Create an instance of TiffImage and load the copied destination image

using (TiffImage image = (TiffImage)Aspose.Imaging.Image.Load(MyDir + "Testconct.tif"))

{

//Create an instance of TiffImage and load the source image

using (TiffImage image1 = (TiffImage)Aspose.Imaging.Image.Load(MyDir + "sample1.tif"))

{

// Create an instance of TIffFrame and copy active frame of source image

TiffFrame frame = TiffFrame.CopyFrame(image1.ActiveFrame);

// Add copied frame to destination image

image.AddFrame(frame);

// save the image with changes.

image.Save();

}

}

[VB.NET]

'Create a copy of original image to avoid any alteration

File.Copy(MyDir&"sample.tif", MyDir&"Testconct.tif", True)

'Create an instance of TiffImage and load the copied destination image

Using image As TiffImage = CType(Aspose.Imaging.Image.Load(MyDir&"Testconct.tif"), TiffImage)

'Create an instance of TiffImage and load the source image

Using image1 As TiffImage = CType(Aspose.Imaging.Image.Load(MyDir&"sample1.tif"), TiffImage)

' Create an instance of TIffFrame and copy active frame of source image

Dim frame As TiffFrame = TiffFrame.CopyFrame(image1.ActiveFrame)

' Add copied frame to destination image

image.AddFrame(frame)

save the image with changes.

image.Save()

EndUsing

EndUsing

Overview: Aspose.Imaging for .NET

Aspose.Imaging for .NET is an image processing & manipulation component that allows developers to create, edit, draw or convert images in their .NET application. It allows developers to convert image files to PSD, BMP, JPEG, PNG, TIFF and GIF formats. Moreover a set of pens, brushes and fonts can be used to draw images or add new elements & text to existing images. Aspose.Imaging for .NET works well with both web & windows applications. Moreover, it adds the support for Silverlight platform.

Contact Information

Aspose Pty Ltd

Suite 163, 79 Longueville Road

Lane Cove, NSW, 2066

Australia

http://www.aspose.com/

sales@aspose.com

Phone: 888.277.6734

Fax: 866.810.9465

 
 
FAQs | Contact Us | Terms & Conditions | Privacy Policy
© 2026 Proserve Technology, Inc.