////c# 代码如下
Aspose.Slides.Presentation ppt = null;
try
{
ppt = new Aspose.Slides.Presentation(filePath);<a class="attachment" href="/uploads/default/5236">testFile.zip</a> (59.7 KB)
}
// Console.WriteLine(">>>>>>>>>>开始将ppt转换为png图片>>>>>>>>>>");
for (int index = 0; index < PageLen; index++)
{
//Access the first slide
ISlide sld = ppt.Slides[index];
//Create a full scale image
var bmp = sld.GetThumbnail(ScaleX, ScaleY);
bmp.SetResolution(128, 128);
//Save the image to disk in JPEG format
bmp.Save(imgPath + string.Format(fileName + "_" + "{0}.jpeg", index.ToString("0000")), System.Drawing.Imaging.ImageFormat.Jpeg);
var bmp_s = sld.GetThumbnail(ScaleX_s, ScaleY_s);
bmp_s.SetResolution(128, 128);
//Save the image to disk in JPEG format
bmp_s.Save(imgPath + string.Format(fileName + "_" + "{0}" + "_s.jpeg", index.ToString("0000")), System.Drawing.Imaging.Ima<a class="attachment" href="/uploads/default/5236">testFile.zip</a> (59.7 KB)
geFormat.Jpeg);
}
//Console.WriteLine(">>>>>>>>>>ppt图片转换完成>>>>>>>>>>");