Free Support Forum -

TIFF split and resize operation is very slow (C# .NET)

We’re evaluating Aspose.Imaging as a potential replacement for our current image processing library. One of the operations we do very frequently is splitting a multi-page TIFF file and saving each frame with a different size as a PNG. We’ve came up with a very simple code which does it in Aspose.Imaging, but the problem is that it’s incredibly slow - splitting a 10 page TIFF and resizing each frame takes almost 40 seconds (!), while our existing solution completes exactly the same operation roughly in 6 seconds.

Can you please see the code below and let me know if we’re missing something?

using (var asposeImg = (TiffImage)Aspose.Imaging.Image.Load(inputFilePath))
            for(var i = 0; i < asposeImg.Frames.Length; i++)
                TiffFrame frame = asposeImg.Frames[i];
                frame.Resize(2550, 3300);
                frame.Save($@"C:\{i}.png", new PngOptions());

Here’s the TIFF file we’re using for the test: (601.3 KB)


I have observed the sample code shared by you and it seems fine. We need to investigate this further on our end. An issue with ID IMAGINGNET-3729 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.