from pptx import Presentation from glob import glob # Presentationインスタンスの作成 ppt = Presentation() # 幅 width = ppt.slide_width # 高さ height = ppt.slide_height # レイアウト, 6番は白紙 blank_slide_layout = ppt.slide_layouts[6] # 画像ファイルの読み込み fnms = glob('./figure/*.png') # ファイル毎にループ for fnm in fnms: # 白紙のスライドの追加 slide = ppt.slides.add_slide(blank_slide_layout) # 画像の挿入 pic = slide.shapes.add_picture(fnm, 0, 0) #