I am getting this error
Source: System.Drawing
Message: Parameter is not valid.
Stack trace: at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Aspose.Slides.Pptx.SlideEx.GetThumbnail(Single scaleX, Single scaleY)
at Granicus.Website.Core.SlidesHandler.ProcessRequest(HttpContext context) in c:\SFODEV01\Granicus\Feature\Ecomments\Source\MediaManager\Src\WebSite.Core\App_Code\SlidesHandler.cs:line 94
when I run this code:
string pptPath = @"C:\test.pptx";
PresentationEx presEx = new PresentationEx(pptPath);
foreach (SlideEx slide in presEx.Slides)
{
float scaleX = 640;
float scaleY = 480;
Image img = slide.GetThumbnail(scaleX, scaleY);
string documentDirectory = @"c:\temp";
string imgPath = Path.Combine(documentDirectory, slideAttachment.FileName);
img.Save(imgPath, ImageFormat.Jpeg);
}
The exception happens when the code runns this line:
Image img = slide.GetThumbnail(scaleX, scaleY);
I am using Aspose.Slides 4.0 on windows xp. This is a .Net 3.5 web applicaiton.
Please help.
Thanks,
Adam