We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem converting slide to image

Hi we are converting slide to imagers, and a single slide is consistently failing with the error


8/21/2015 9:11:01 AM:ASPOSE Caught exception at ExtractSlideContent System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Aspose.Slides.ImageCollection.AddImage(MemoryStream stream)
at .( )
at .( , IPresentation )
at .(Presentation , Stream )
at Aspose.Slides.Presentation.(Stream )
at Aspose.Slides.Presentation…ctor(String file, LoadOptions loadOptions)
at PPTXProjectExtractorSrvs.ExtractorProc.extractSlideContentAspose()

I’ve added the slide to aid in debugging.

Thanks

-pankaj

Hi Pankaj,


Thank you for your interest in Aspose.Slides.

I have observed your comments and worked with the presentation files shared by you. I have not been able to reproduce the issue. I request you to please try using Aspose.Slides for .NET 15.6.0 on your end and then share feedback with us. I have attached the sample code which I am using on my end to convert the slide to image as well as the generated image for your kind reference.

Presentation pres = new Presentation(@“D:\39.pptx”);
if (pres.Slides != null && pres.Slides.Any())
{
int pageNumber = 0;
foreach (ISlide slide in pres.Slides)
{
pageNumber++;
Bitmap bmp = slide.GetThumbnail(1f, 1f);
bmp.Save(@“D:\39-” + pageNumber + “.jpg”, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}

Please let us know if the issue persists. We will be happy to assist you further.

Best Regards,