小编Aur*_*uro的帖子

从演示文件中提取图像

我正在研究python-pptx包。对于我的代码,我需要提取演示文稿文件中存在的所有图像。有人可以帮助我吗?

在此先感谢您的帮助。

我的代码如下所示:

import pptx
Run Code Online (Sandbox Code Playgroud)

prs = pptx.Presentation(filename)

for slide in prs.slides:
    for shape in slide.shapes:
        print(shape.shape_type)
Run Code Online (Sandbox Code Playgroud)

使用shape_type时,显示的是ppt中存在的PICTURE(13)。但是我想将图片提取到存在代码的文件夹中。

python python-2.7 python-pptx

2
推荐指数
2
解决办法
1597
查看次数

标签 统计

python ×1

python-2.7 ×1

python-pptx ×1