I’m encountering an issue with Aspose.Slides.Net, Version 21.10.0 when trying to load a PPTX file. The application throws the following exception:
Exception Type: PptxReadException
Message: The type initializer for ‘Gdip’ threw an exception.
The funny part is; after upgrading to the latest version, this exception changed its position from Read to Save.
Exception Type: PlatformNotSupportedException
Message: System.Drawing.Common is not supported on this platform.
Stack Trace: at System.Drawing.Image…ctor()
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at .(Size , )
at .(Size )
at Aspose.Slides.Slide.GetThumbnail(Size imageSize)
at .(e , IPresentation )
at .(Presentation , , IPptxOptions , InterruptionToken )
at .(Presentation , Stream , , IPptxOptions , InterruptionToken )
at Aspose.Slides.Presentation.(Stream , , IPptxOptions )
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)
It seems to be related to the GDI+ library, which Aspose.Slides uses for rendering images and shapes in PowerPoint files.
I’ve already tried reinstalling the library and ensuring that all system dependencies (like GDI+) are present, I also tried changing the dependency library to SkiaSharp, but the issue persists.
Any help would be much appreciated!