Python Presentation模块生成的pptx文件,为什么windows预览图就是一片空白呢?
这是我的代码:
from pptx import Presentation
from pptx.util import Inches
prs = Presentation()
bsl = prs.slide_layouts[0]
slide = prs.slides.add_slide(bsl) # 新建空白页[6]
# 确定图片在空白ppt中的位置,以及图片的大小
left, top, width, height = Inches(2), Inches(1), Inches(5), Inches(5)
pic = slide.shapes.add_picture(r'E:\1.png', left, top, width, height)
prs.save(r'E:\111\test004.pptx')
文件是可以生成的,但是windows资源管理器里看,大图图标都是一片空白。
旁边power point做的test005.pptx,就有预览图

我想让我程序生成的ppt,预览图是第一页的缩略图,求大家帮忙看看
这是我的代码:
from pptx import Presentation
from pptx.util import Inches
prs = Presentation()
bsl = prs.slide_layouts[0]
slide = prs.slides.add_slide(bsl) # 新建空白页[6]
# 确定图片在空白ppt中的位置,以及图片的大小
left, top, width, height = Inches(2), Inches(1), Inches(5), Inches(5)
pic = slide.shapes.add_picture(r'E:\1.png', left, top, width, height)
prs.save(r'E:\111\test004.pptx')
文件是可以生成的,但是windows资源管理器里看,大图图标都是一片空白。
旁边power point做的test005.pptx,就有预览图

我想让我程序生成的ppt,预览图是第一页的缩略图,求大家帮忙看看