This experimental application explores dotent MAUI on maccatalyst capabilities.
- ✅ Accessing Photo Library
- 🚧 Detect Slide & Deskew
- 🚧 Create a Slide Deck
We get this error:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, IntPtr scan0, IntPtr& bitmap)
at.(Size , )
at.(Size )
at Aspose.Slides.Slide.GetThumbnail(Size imageSize)
at .( , IPresentation, IPptxOptions )
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)
The error remains even after brew install mono-libgdiplus.
Associated Aspose Tickets:
To circumvent this, we export only images and run the slides generation in an ubunto container with all relevant libgdip packages installed.
For that we use this devcontainer and install libgdiplus:
sudo apt update && sudo apt install -y libgdiplusTo verify it was successfully installed:
dpkg -l | grep libgdiplusUnfortunately, when we run the Aspose.Slides app, we still get the same error inside the devcontainer:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
It seems we really have to use Aspose.Slides on Windows.
Or use a different pptx creator.