Last active
June 16, 2019 02:19
-
-
Save junhoyeo/373b08b1e6cff434acf1f8cd6d275b6d to your computer and use it in GitHub Desktop.
PPT Output Images to PPTX backgrounds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pptx import Presentation | |
| from pptx.util import Inches | |
| prs = Presentation() | |
| prs.slide_width = 11887200 | |
| prs.slide_height = 6686550 | |
| title_slide_layout = prs.slide_layouts[0] | |
| for i in range(1, int(input()): | |
| slide = prs.slides.add_slide(title_slide_layout) | |
| slide.shapes.add_picture(f'./슬라이드{i:02d}.png', | |
| Inches(0), Inches(0), | |
| width=prs.slide_width, | |
| height=prs.slide_height) | |
| prs.save('output.pptx') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment