Free Support Forum - aspose.com

Aspose.Drawing conflicts with System.Drawing.Common in Aspose.Slides for .NET

Hi! We have problems in converting Slides to PNG in Linux with libgdiplus.
Can i use Aspose.Drawing.dll instead System.Drawing.Common.dll in Aspose.Slides.NET to avoid errors from “libgdiplus”?
If yes, how can i do it?

Now when i add Aspose.Drawing from NuGet to current project, i have many errors CS0433 like this:

|Error|CS0433|The type ‘ImageFormat’ exists in both ‘Aspose.Drawing, Version=21.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ and ‘System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ Preview.Conversion.StandartPlugin

“System.Drawing.Common.dll” in dependencies “Aspose.Slides.NET
Preview - Microsoft Visual Studio (Administrator).png (2.4 KB)

This bug from libgdiplus
libgdiplus linux artefact.png (78.9 KB)

@demonspe,
Welcome to our community! Thank you for the issue description. I added a ticket with ID SLIDESNET-42656 in our tracking system. Our development team will investigate this case. I answer your questions as soon as possible.

@demonspe,
Our development team investigated the issue. It is not possible to use Aspose.Drawing library for Slides instead of System.Drawing.Common on Linux. System.Drawing.Common is .NET Standard library that defines abstraction of the graphic system. The actual implementation used by System.Drawing.Common depends on the platform it runs on. For Windows, it will be GDI, for Linux - libgdiplus. Aspose.Slides refers to System.Drawing.Common and this reference cannot be easily replaced with something else.

To investigate this case and help you, please share and specify the following:

  • input presentation file
  • code example reproducing the problem with text
  • version of Linux

Thanks for your answer! We will prepare test app for this case. In this or next week.