PlatformNotSupportedException Occurs when Saving a Slide as a GIF on Linux

Hi,
We are receiving the following issue when trying to save as gif the first slide of a presentation.

System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
at System.Drawing.Image…ctor()
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at Aspose.Slides.Export.PresentationAnimationsGenerator…ctor(Size frameSize)
at resentation , Stream, IList`1 , GifOptions )
at Aspose.Slides.Presentation.Save(Stream stream, Int32[] slides, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(Stream stream, Int32[] slides, SaveFormat format)
at TestPreview.Program.Main(String[] args) in C:\source\TestSlidesPreview\Program.cs:line 26

This is the test application: TestSlidesPreview.zip (26.5 KB).

The real code runs in a Linux-based Azure Function. I also tested locally with Ubuntu 22.04.2 LTS and produced the same result.

Following the recommendation on Fix System.Drawing.Common I was able to run the code, but copying custom DLLs is not an option for production environments.

Is there any other way to get the image of the slide on Linux? or when are you planning to incorporate the fix mentioned above in the Nuget packages?

Thanks.

@ANDREA.FARRIS,
Thank you for contacting support. I am working on the question and will get back to you as soon as possible.

1 Like

Ok, thank you Andrey

@ANDREA.FARRIS,
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44223

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@ANDREA.FARRIS,
The sample project you provided includes Aspose.Slides for .NET via NuGet. The Aspose.Slides NuGet package is not suitable because it provides cross-platform support for only the .NET Standard.

Please delete the Aspose.Slides NuGet package and follow the instructions below to configure your project using Aspose.Slides from the ZIP package:

Please also note that the following packages must be installed on your operating system.

  • libfontconfig1
  • libfreetype6

Please let us know if the issue is resolved on your end.