Hello,
I'm trying to save an image of each slide in a presentation to a TIFF file. I'm using the Slide.GetThumbnail method to return an Image object. I'm then just using Image.Save to save the file to disk.
Is there a way to specify the output DPI of this file? Or, perhaps an alternative method for saving each slide to an image file?
Thanks
public static void ToTiff(String input, String output)
{
// Open the powerpoint file
Presentation pres = new Presentation(input);
Console.WriteLine("[{0}] {1} slides to process", Path.GetFileNameWithoutExtension(input), pres.Slides.Count);
foreach (Slide slide in pres.Slides)
{
Console.WriteLine(" - Processing slide #{0}", slide.SlideId);
// Save the slide to file
Image image = slide.GetThumbnail(1.0, 1.0);
// Specify 300x300 dpi
// Save image to file
image.Save(String.Format(@"{0}\{1}_Slide{2}.tif", output, Path.GetFileNameWithoutExtension(input), slide.SlideId), ImageFormat.Tiff);
}
}