Splitting tiff files into single tiff but file size is getting higher

Hi Team,

I am using following code to split multipage tiff to single page tiff.
All working fine but size of newly created single page tiff is large.

Can you please suggest any changes in the code to generate colored image file with minimal size.

TiffOptions outputSettings = new TiffOptions(TiffExpectedFormat.TiffDeflateRgb);
outputSettings.setCompression(TiffCompressions.Lzw);
tiffFrame.save("C:\\test\\TestFiles\\MultiPageTest\\SplittedFiles\\" + "Frame-" + frameCounter + ".tiff",outputSettings);
tiffFrame.close();
tiffFrame.dispose();


Thanks & Regards,
Arvind
Hi Arvind,

Thank you for your inquiry.

We have investigated the issue at your end. We are able to notice the said issue with a very slight difference is size. Code snippet that we used is given below for your reference. Source file and the resultant files are also attached.

Please forward us your sample input image and the complete code snippet that you are using. This will help us to further investigate the issue.

CODE:

TiffImage multiImage = (TiffImage) Image.load("result.tif");
int frameCounter = 0;

for (TiffFrame tiffFrame : multiImage.getFrames())
{
multiImage.setActiveFrame(tiffFrame);
com.aspose.imaging.Color[] pixels = multiImage.loadPixels(tiffFrame.getBounds());

TiffOptions outputSettings = new TiffOptions(TiffExpectedFormat.TiffDeflateRgb);

outputSettings.setCompression(TiffCompressions.Lzw);
tiffFrame.save("Frame-" + frameCounter + ".tif",outputSettings);
tiffFrame.close();
tiffFrame.dispose();
frameCounter++;
}