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.
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.
Share Improve this question edited Feb 17 at 17:08 marc_s 755k184 gold badges1.4k silver badges1.5k bronze badges asked Feb 17 at 16:07 user24241471user24241471 134 bronze badges1 Answer
Reset to default 0You 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.