Add an image to the slide at the specified position and size. :param slide: The slide object where the image should be placed. :param name: A string name/label for the shape. :param left_inch: Left position in inches. :param top_inch: Top position in inches. :param widt
(slide, name, left_inch, top_inch, width_inch, height_inch, image_path)
| 1554 | font.name = font_name |
| 1555 | |
| 1556 | def add_image(slide, name, left_inch, top_inch, width_inch, height_inch, image_path): |
| 1557 | """ |
| 1558 | Add an image to the slide at the specified position and size. |
| 1559 | |
| 1560 | :param slide: The slide object where the image should be placed. |
| 1561 | :param name: A string name/label for the shape. |
| 1562 | :param left_inch: Left position in inches. |
| 1563 | :param top_inch: Top position in inches. |
| 1564 | :param width_inch: Width in inches. |
| 1565 | :param height_inch: Height in inches. |
| 1566 | :param image_path: File path to the image. |
| 1567 | :return: The newly created picture shape object. |
| 1568 | """ |
| 1569 | shape = slide.shapes.add_picture( |
| 1570 | image_path, |
| 1571 | Inches(left_inch), Inches(top_inch), |
| 1572 | width=Inches(width_inch), height=Inches(height_inch) |
| 1573 | ) |
| 1574 | shape.name = name |
| 1575 | return shape |
| 1576 | |
| 1577 | def set_shape_position(shape, left_inch, top_inch, width_inch, height_inch): |
| 1578 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected