如何在python pptx中将两个图像添加到一张幻灯片 [英] How to add two images to one slide in python pptx

查看:347
本文介绍了如何在python pptx中将两个图像添加到一张幻灯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将两张图片粘贴到一张幻灯片上.但是,每当我不确定如何执行此操作时.我知道如何添加一张照片,但是无法在线找到添加两张照片的任何内容.

I am trying to paste two pictures into a powerpoint slide on after another. However, whenever I am not sure how to do this. I know how to add one picture, but can't find anything online for adding two.

要添加图片,请执行以下代码

To add a picture I do the code below

pic = slide.shapes.add_picture(img_path, left, top, width = Inches(7.72), height = Inches(4.5))

推荐答案

只是add_picture具有一组不同的坐标,以便图片不会重叠,

Just add_picture with a different set of coordinates so that the pictures don't overlap, as in the official documentation.

这篇关于如何在python pptx中将两个图像添加到一张幻灯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆