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

Free Support Forum - aspose.com

OutOfMemoryException and GDI+ Exceptions Are Thrown in Aspose.Slides 21.11

Hi
I am under Aspose.Slides 21.11 x86 and have “outofmemoryexception” and “gdi+” exceptions for presentations over 300mo up to 1.7go under windows 10 x64.

How to fix that ? is there Aspose.Slides x64 version ?

Thank you so much

@kokilol,
Welcome to our community! Thank you for posting the inquiry.

To investigate this case on our side, please share/specify the following:

  • code example or a simple project that reproduces the exceptions
  • presentation files

You can switch to x64 version in project settings.

Hello again

First of all, here is the code used for opening and generating thumbnails, is there anything incorrect ?

I am using aspose.slides x86 version on windows 10 64bits.

Presentation file weights over 700mo.

Thanks for your help

try
{
using (var stream = new FileStream(pptpath, FileMode.Open))
{
presentation = new Presentation(stream, new LoadOptions()
{
BlobManagementOptions = new BlobManagementOptions()
{
IsTemporaryFilesAllowed = true,
MaxBlobsBytesInMemory = 50 * 1024 * 1024 // 50 MB
}
});

//export img
if (presentation != null && presentation.Slides.Count > 0)
{
for (int i = 0; i < presentation.Slides.Count; i++)
{
Slide s = (Slide)presentation.Slides[i];
if (!s.Hidden)
{
try
{
Bitmap bmp = s.GetThumbnail(scaleX, scaleY);
bmp.Save(thumbspath + @"\Slide" + (i + 1).ToString(“0000”) + “.jpg”, System.Drawing.Imaging.ImageFormat.Jpeg);
bmp.Dispose();
bmp = null;
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
}
}
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}

@kokilol,
Thank you for the code example. It will take me a while to answer. We will reply to you as soon as possible.

@kokilol,
Your code example for generating thumbnails looks correct. For opening large presentations, you should also use BlobManagementOptions.PresentationLockingBehavior property as shown below:

LoadOptions loadOptions = new LoadOptions
{
   BlobManagementOptions = new BlobManagementOptions
   {
       //...
       PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked,
       //...
   }
};

Documents:
Open Large Presentation
Load a Large Presentation as BLOB
Frequently Asked Questions

Please read the following article to get instructions for configuring the target platform:

Hi i will try this in real conditions and let you know. Thank you

Hi
I tried with 1.7go PowerPoint and this worked beautifully, this is huge !
So many thanks Andrey

Are you working on keynote support ? :slightly_smiling_face:

Bye thanks

Hi i will try this in real conditions and let you know. Thank you

@kokilol,
Unfortunately, Aspose.Slides does not support the format of presentations for Keynote application by Apple. I linked this forum thread to the appropriate task with ID SLIDESNET-25966 in our issue tracking system. But as far as I can see there are no immediate plans to support this format. You will be notified when the issue is resolved.