public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Shapes();
// Instantiate a Presentation class that represents the presentation file
using (Presentation p = new Presentation(dataDir + "HelloWorld.pptx"))
{
// Create a full scale image
using (Bitmap bitmap = p.Slides[0].Shapes[0].GetThumbnail(ShapeThumbnailBounds.Shape, 1, 1))
{
// Save the image to disk in PNG format
bitmap.Save(dataDir + "Scaling Factor Thumbnail_out.png", ImageFormat.Png);
}
}
}
}