Reputation: 13
I want to create thumbnails from ppt slide my code is working on windows but not working on non-Windows OS.
Please help me with pure cross platform code.
System.Drawing
is not supported for non-Windows OS.
My code is:
for (int j = 0; j < pr.Slides.Count; j++)
{
ISlide sld pr.Slides[j];
using (Bitmap bmp sld.GetThumbnail (1f, 1f))
{
using (MemoryStream ms = new MemoryStream())
{
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.png);
byte[] imageBytes = ms.ToArray();
string base64String = Convert.ToBase64String(imageBytes);
slides.Add(new slideModel { SlideNumber = j, SlideImage = base64String });
}
}
}
Please help me with SkiaSharp or any recommended opensource cross platform library.
Upvotes: 0
Views: 26
Reputation: 34
You should use Aspose.Slides.NET6.CrossPlatform. Please note that Aspose.Slides.NET6.CrossPlatform requires GLIBC 2.23 and higher for Linux systems. For macOS, the fontconfig
package has to be installed. I am working as a support developer at Aspose.
Upvotes: 0