Locating images in a powerpoint

J

jondelac

Hi ... Does anyone know how I can programatically locate images in a
powerpoint presentation? I am trying to write a program that saves all
the images that are pasted into a presentation as seperate files (I
dont care about the file names of the images... I just need the binary
image data)

Jon
 
B

Bill Dilworth

Have your software save the presentation as an HTML file, then delete any
non-picture format files from the HTML folder.


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
J

jondelac

Thanks... that's a good way to do it...

Do you know if there is anyway to do it with out converting the
document? Can I locate the image in the stream by parsing the compound
document format headers etc?

Thanks
Jon
 
B

Bill Dilworth

In 2007, you will be able to, but the internal file structures in previous
versions is not published.


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
J

jondelac

Thats because in 2007 they are in XML correct?

I have a parser that knows how to parse Compound Document Files and
spit out the directory streams. Parsing ppt documents I get a directoy
stream called "Pictures". I just dont know what format PPT is saving
those images in... Can you help?

Jon
 
S

Steve Rindsberg

Thats because in 2007 they are in XML correct?

I have a parser that knows how to parse Compound Document Files and
spit out the directory streams. Parsing ppt documents I get a directoy
stream called "Pictures". I just dont know what format PPT is saving
those images in... Can you help?

Images might be held internally as PNG, JPG or GIF
 
J

jondelac

Great... that answers the question... I do see JFIF headers in the
stream so this this consistent with what I see. What is the other data
in the Pictures stream? Also, does this imply that PPT stores the
images in the format that they were introduced into the PPT
presentation as with no conversion?

Jon.
 
S

Steve Rindsberg

Great... that answers the question... I do see JFIF headers in the
stream so this this consistent with what I see. What is the other data
in the Pictures stream?

Beats me. MS doesn't document the file format and there's probably something
in the EULA to discourange you from trying to reverse-engineer it. But what
fun would that be? ;-)
Also, does this imply that PPT stores the
images in the format that they were introduced into the PPT
presentation as with no conversion?

It stores graphics as PNG, JPG or GIF. As near as I can tell, JPGs stay JPGs,
GIFs if animated stay GIF, everything else becomes PNG.

Oddballs like EPS would need to be retained as-is. There may be other
exceptions, but that pretty much covers the basics.

Save the presentation as HTML and look at the folder full of supporting files;
that's pretty much a mirror of the graphics in the PPT file.
 
J

jondelac

Thanks Steve!

Do you by any chance know the compression they use on the other streams
like the PowerPointDocument stream?
 
S

Steve Rindsberg

Thanks Steve!

Do you by any chance know the compression they use on the other streams
like the PowerPointDocument stream?

Afraid not. In 2007, it all gets simpler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top