How to get background image from pptx file (convert pptx background to image)
-
Sunday, December 25, 2011 4:46 PM
Hi All
I'm working with Openxml to convert a pptx file (Powerpoint 2010) to html 5, and I have an issue:
- I want to find out theme image background of a slide to show in html page.
And I Tried to convert theme of slide to image But I couldn't.
what I need is an image background, but i couldn't get it!
anybody can help me? how to get image background of a slide ?
- Edited by Thanh Uy Sunday, December 25, 2011 4:49 PM
All Replies
-
Sunday, December 25, 2011 7:18 PMModerator
Hi Thanh Uy, thank you for your question. A member of the protocol documentation team will respond to you soon.
Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team -
Monday, December 26, 2011 4:27 PM
Thanks you so much.
I'm waiting for help, I've spend alot of time for this issue :-)
-
Tuesday, December 27, 2011 9:35 PMModerator
Hi Thanh Uy, the background image(s) will be contained in the package in the ppt\media folder. More information about PresentationML package structure can be found in ECMA-376, part 1, section 13.2.
Please let me know if this helps.
Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team- Proposed As Answer by JCurryMicrosoft Employee, Moderator Tuesday, December 27, 2011 9:35 PM
-
Wednesday, December 28, 2011 10:03 AM
Hi JCurry
Thank you for your answer,
I could get images of slide by that way (using ImagePart),
but what I need is themes of slide, so I want to convert themes (as Background image) to image (by C#) but I couldn't .
Anyway to do this? how to convert ThemePart to image?
Please inform to me if you know how to do.
Thanks.
Best regards
-
Wednesday, December 28, 2011 10:26 PMModerator
Hi Thanh Uy, the 'background image' for a theme is not an image that can be extracted from the file. It's a series of DrawingML commands defined in an XML document. To recreate it you would need to parse the DrawingML commands and redraw it using GDI+ or something similar.
You can find more details about the 'theme' element in ECMA-376, Part 1, section 20.1.6.9. It sounds like you are using the OpenXML SDK, so it might offer you an easier way to parse the theme elements other than the raw XML.
Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team- Proposed As Answer by JCurryMicrosoft Employee, Moderator Wednesday, December 28, 2011 10:26 PM
- Marked As Answer by Nam Ka - MSFTOwner Friday, December 07, 2012 5:02 PM

