I got below exception when using method GetThumbnail for a chart element in a slide.
An unhandled exception of type ‘System.StackOverflowException’ occurred in System.Drawing.dll
Here is my sample code.
public static byte[] ExportImage(PPT.IShape shape)
{
byte[] chartImage = null;
try
{
using (MemoryStream ms = new MemoryStream())
{
Bitmap bmp = shape.GetThumbnail();
bmp.Save(ms, ImageFormat.Png);
chartImage = ms.GetBuffer();
}
}
catch (Exception ex)
{
Logger.Error(string.Format("Error in exporting Thumbnail of chart. Chart ID: {0}", shape.Name), ex);
}
return chartImage;
}
Aspose.Slides Version is 17.12.1, while same code worked in Aspose.Slides 15.1.0, I’m not sure where is the problem.
@14azheng,
I have observed your comments. Can you please share source file so that we may further investigate to help you out. Also please share environment detail with us. I suggest you before sharing requested information please try to use Aspose.Slides latest version 17.12 on your end.
Thanks for the quick revert, I have attached the sample program for your investigate, and the Aspose.Slides version the latest 17.12.1.0.
AsposeThumbnail.zip (2.3 MB)
@14azheng,
I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-39733 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 automatically notified once the issue will be fixed.
Thanks, and one more hint that might help you resolve the problem, is that i used to use Aspose.Slides 15.1 and everything was fine, until I upgraded to the latest 17.2.1.
Your team should be able to get something bystudying the difference between these 2 versions.
Hope this issue can be fixed soon.
@14azheng,
Thank you for sharing the details with us. We will investigate the issue on our end and will share the feedback with you as soon as possible.
The issues you have found earlier (filed as SLIDESNET-39733) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan