We are using Aspose.Slides library to extract data from PPT .
we are facing issues while creating thumbnail for tables/charts .Issue is below mentioned exception
Parameter is not valid. at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
This issue comes only when we are running application in Linux containers , when inw erun in IIS it works fine.
using (var ms = new MemoryStream())
{
try
{
var presentation = new Presentation(ms);
var slideShapes= presentation.Slides[slide.SlideNumber].Shapes;
var chrt = slideShapes.OfType()[0]
IShape chrt
chrt.GetThumbnail().Save(ms, ImageFormat.Png);
}
catch (Exception ex)
{
}
}
It is an dotnet core (3.1)app running in Linux container
I am really sorry , I am not allowed to share the PPT file it belongs to an client . I am using Debian 10 image for my container.
I debugged the issue and found that width of chart is 466.43 which is floating point value and I think Bitmap constructor needs int values .
Please let me know if anything else is required.
@rahulvalecha145,
We are doing our best to help you. But unfortunately, we cannot reproduce the issue and find out the causes without that PPT file in your case. As a workaround, try to create a similar presentation with the same error.
Graph-issue.zip (483.7 KB)
Hi Andrey , I am attaching ppt which has graph who throws exception on calling GetThumbnail method.
I again tried and I am sure that it works fine on IIS but thows exception while running in Linux container.
Can you please provide us the solution asap ?
@rahulvalecha145,
Thank you for the presentation sample. I managed to reproduce the error. I’ve logged the issue in our tracking system with ID SLIDESNET-42554. Our development team will investigate this case. You will be notified when it is fixed.
I requested an estimated time to fix the issue from our development team. I will let you know when it is possible.