We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Combine TIFFs to Multipage TIFF with Acceptable Performance

I have around two to five hundred single-page TIFFs to combine into a single multipage TIFF.
With the following code, it begins to process files at a rate of 5 to 10 seconds each, but after 12 hours, it is still processing.
If I move the Save outside of the for-loop (save only at the end), then the AddFrame steps run quickly, but the Save never completes.
I can manually combine the 500 files in an editor in seconds.

Is there an alternative means to get this to perform?

for (int counter = 0; counter < filesArray.Length; counter++)
{
using (TiffImage imageWork = (TiffImage)Aspose.Imaging.Image.Load(pageOneTiff))
{
using (TiffImage imageCur =
(TiffImage)Aspose.Imaging.Image.Load(filesArray[counter].FullName))
{
TiffFrame frame = TiffFrame.CopyFrame(imageCur.ActiveFrame);
imageWork.AddFrame(frame);
imageWork.Save(fileOutTmp);
}
}
}

@varsoil

We need to investigate this issue on our end. Please share the source files reproducing the issue along with workable sample code.

I have zipped the solution, along with sample input files. The zip file is too large to be accepted for upload. Can you provide a method for getting the file to you?
As an alternative, I uploaded the Program.cs and three input files only. To run, first copy the work folder to C:\temp. Explanation of the issues is in the program comments.

Example.zip (289.9 KB)

@varsoil

The API also supports Tiff batch mode. Can you please try the implementation given over following documentation link on your end.