I’m currently working on a project that involves bitmaps from PowerPoint (PP) presentations. Saving a presentation as JPEG from PP doesn’t satisfy me at all. Hard compressed files, no anti alias text, no control over the size of the images etc. etc. frustrates me really. If you have experienced the same, then read on.
An article by Mark Belles on screen capturing here at CodeProject inspired me to create the following application.
Using the code
The main engine is a class,
PowerPointDump that has only one method,
Dump loops through all the slides in the presentation window and dumps the screens into PNG images, but first it sets the size of the presentation window to match our choice of bitmap size.
To enable myself to control PowerPoint I've made a reference to the "Microsoft Office 9.0 Object Library" COM object. So you need PP in your computer (suffice to say?). I could of course have used the primary interop assembly (PIA) for office XP, but I’m still on Office 2000.
Just for fun I’ve used a singleton pattern for the engine. Its use is straightforward:
int result =
outputPath, 800, 600,
Points of interest
With the help of the screen capture code, I could realize my idea of how to get nice bitmaps from the PP slides. So this little article is a small payback to all of you contributing to CodeProject.
- Posted on June 8th, 2005.