When executing the code below in Microsoft Azure’s development fabric (the cloud simulator that you run on your desk top) or in Azure hosted by Microsoft, I get the following error:
{System.Collections.ListDictionaryInternal}
“Out of memory.”
“System.Drawing”
at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc)
at System.Drawing.Font.GetHeight()
at iu.a(String A_0, RectangleF A_1, rd A_2)
at Aspose.Slides.Pptx.SlideEx.a(e2 A_0, RenderContext A_1)
at Aspose.Slides.Pptx.SlideEx.b(e2 A_0, RenderContext A_1)
at Aspose.Slides.Pptx.SlideEx.GetThumbnail(Single scaleX, Single scaleY)
at WebRole1._Default.Page_Load(Object sender, EventArgs e) in D:\My Dropbox\CloudTest2\BlobTest\WebRole1\Default.aspx.cs:line 41
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
If I run the same code in a IIS 7.0 based ASP .Net 3.5 application, I do not get an error.
What is the solution for using Aspose.Slides with Microsoft Azure?
//Code snippet
PresentationEx pres = new PresentationEx(“D: \sample.pptx”);
foreach(SlideEx slideEx in pres.Slides) {
Bitmap img = slideEx.GetThumbnail(1 f, 1 f);
}
Thank you