I am merging to large TIFF files and using copyframe method. This is taking a long long time to do. is there a better method?
This is the code I am using… can this be optimized?
Dim frame As TiffFrame
Using image As TiffImage = CType(Aspose.Imaging.Image.Load(txtEmailDocument.Text), TiffImage)
Try
For i = 0 To lstattachments.Items.Count - 1
If lstattachments.GetSelected(i) = True Then
Using image1 As TiffImage = CType(Aspose.Imaging.Image.Load(Program.imagepath + lstattachments.Items(i) + ".TIFF"), TiffImage)
For Each tiffFrame As TiffFrame In image1.Frames
image1.ActiveFrame = tiffFrame
frame = tiffFrame.CopyFrame(image1.ActiveFrame)
' Add copied frame to destination image
image.AddFrame(frame)
' save the image with changes.
image.Save()
Next
End Using
End If
Next