Aspose.Imaging - Tiff to Jpg Conversion failed

Dear Team,

I am trying to convert tif file to html file in my c# application using version 22.3. Its giving exception “Image Saving failed”. Plz find the sample enclosed.

XCoder

@perfectdata.techno, please add an example of the code with which you did this.

Plz. find below code which i have used :

string strHtmlPath = string.Concat(folderPath, “\”, returnFileName, “.jpg”); //destination path
using (Aspose.Imaging.FileFormats.Tiff.TiffImage multiImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(strTreePath)) //source path
{
//Create an instance of int to keep track of frames in TiffImage
int frameCounter = 0;

                        //Iterate over the TiffFrames in TiffImage
                        foreach (Aspose.Imaging.FileFormats.Tiff.TiffFrame tiffFrame in multiImage.Frames)
                        {
                            this.MessageStatus(num + 1, frameCounter + 1);
                            strHtmlPath = string.Concat(folderPath, "\\", returnFileName, "_", frameCounter.ToString(), ".jpg");
                            tiffFrame.Save(strHtmlPath, new JpegOptions());
                            frameCounter++;                                
                        }
                    }

XCoder

@perfectdata.techno, There is not enough memory to process the image. You can set a memory limit, in which case the operation will be successful.

using (Aspose.Imaging.FileFormats.Tiff.TiffImage multiImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(strTreePath, new LoadOptions(){BufferSizeHint = 100}))

The limit is set in megabytes.

Yes it worked. Thanks