ASP.NET 8 - Alpine 3.18 - System.Drawing.Common Is Not Supported on This Platform

Hi,

I would like to know if Aspose.Slides is supported in the following platform below. Thanks!

Platform
.NET Version - v8.0.0
Aspose.Slides.NET - v23.12.0
Alpine Image - v3.18
libgdiplus is already installed

Error

System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.\n at System.Drawing.Image…ctor()\n at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)\n at \u0003\u001B\u0018\u0016\u0002.\u0002(Size \u0002, \u000E\u0002\u0019\u001A \u0008)\n at \u0003\u001B\u0018\u0016\u0002.\u0002(Size \u0002)\n at Aspose.Slides.Slide.GetThumbnail(Size imageSize)\n at \u000F\u0010\u000F\u0005.\u0003(\u0003\u000F\u001B\u001A \u0002, IPresentation \u0008)\n at \u000F\u0010\u000F\u0005.\u0002(Presentation \u0002, Stream \u0008, \u0002\u001A\u0018\u0016\u001A \u0005, IPptxOptions \u0006, InterruptionToken \u0003)\n at Aspose.Slides.Presentation.\u0002(Stream \u0002, \u0002\u001A\u0018\u0016\u001A \u0008, IPptxOptions \u0005)\n at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)\n at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format)

@davejitsuwtw,
Thank you for posting the question.

Aspose.Slides for. NET requires GLIBC 2.23 or higher installed on the OS. Please check if this is the case.

I used the gcompat as desribed here
https://wiki.alpinelinux.org/wiki/Running_glibc_programs#gcompat

@davejitsuwtw,
Thank you for the issue details. To investigate the case on our end, please share the following:

  • simple project that reproduces the error
  • Docker file (if you used it)

I resolved this issue by doing the following.

Dockerfile

RUN apk add krb5-libs libgcc libintl libssl3 libstdc++ zlib
RUN apk --no-cache add libgdiplus

NET8 Project

<RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />

@davejitsuwtw,
We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.

Getting same issue after implementing same changes

@sfulari,
We are sorry that you have to encounter this problem. Could you please share the simplest project to reproduce the error? Then we will investigate the case and do our best to resolve the issue.