Hi Sergei,
The change you suggested helped.
However, we still have the same error when trying to convert a PPT file to PNG image using Slides,
And Slides doesn’t have Aspose.Slides.Drawing.
So what should we do?
This is the code we use:
var pngImages = new List<byte[]>();
for (var p = 0; p < 3; p++)
{
var slide = ppDoc.Slides[p];
var extractedPage = slide.GetThumbnail(1f, 1f);
var ms = new MemoryStream();
extractedPage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
pngImages.Add(ms.ToArray());
}
return pngImages;
This is the error in Slides:
System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
Error: 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 .(Size , )
at .(Size )
at Aspose.Slides.Slide.GetThumbnail(Size imageSize)
I assume you are using Aspose.Slides for .NET from a NuGet package. The NuGet package contains a Windows-only version of Aspose.Slides for .NET 6/7 at the moment. Please try using a cross-platform version of Aspose.Slides for .NET 6 from the ZIP package.
Please also note that the following packages must be installed on your operating system.
Cross-platform Aspose.Slides for .NET6 can be used for .NET 7 and future .NET releases.
Also, our development team has published a NuGet package with a cross-platform Aspose.Slides for .NET 6. Please try using it, if you don’t want to use Aspose.Slides for .NET 6 from the ZIP package.