# Convert Image to PPT in Python

> Convert images to PPT in Python. Use the Aspose.Slides Python API to place an image on a slide and save it as a PowerPoint 97-2003 presentation.

Source: https://products.aspose.com/slides/python-net/conversion/image-to-ppt/
Updated: 2026-07-23



## Convert Image to PPT in Python

[*Aspose.Slides for Python via .NET*](/slides/python-net/) lets you create a PowerPoint presentation from a raster image. Add the image to `Presentation.images`, place it on a slide with `ShapeCollection.add_picture_frame`, and call `Presentation.save` with `SaveFormat.PPT`.

The resulting PPT file contains one slide whose size matches the source image. This workflow preserves the image's aspect ratio and does not require Microsoft PowerPoint or another presentation application.

## Convert an Image to PPT Using Python

Create a `Presentation`, add the source image to its first `Slide`, and save the result in the PowerPoint 97-2003 format.

### Python code for converting an image to PPT

```python
with slides.Presentation() as presentation:
    slide = presentation.slides[0]

    with slides.Images.from_file("image.png") as source_image:
        presentation_image = presentation.images.add_image(source_image)

    presentation.slide_size.set_size(
        presentation_image.width,
        presentation_image.height,
        slides.SlideSizeScaleType.DO_NOT_SCALE,
    )

    slide.shapes.add_picture_frame(
        slides.ShapeType.RECTANGLE,
        0,
        0,
        presentation_image.width,
        presentation_image.height,
        presentation_image,
    )
    presentation.save("image.ppt", slides.export.SaveFormat.PPT)
```

## How to Convert an Image to PPT Using the Aspose.Slides Python API

Follow these steps to convert an image to PPT in Python.

Install [*Aspose.Slides for Python via .NET*](/slides/python-net/).

Create a `Presentation` and access its first `Slide`.

Load the source image with `Images.from_file`, add it to `Presentation.images`, and use its dimensions for the slide and picture frame.

Call `Presentation.save` with the output file path and `SaveFormat.PPT`.

## Convert Images to Other Supported Formats

- [IMAGE TO PPTX](/slides/python-net/conversion/image-to-pptx/)
- [JPG TO PPT](/slides/python-net/conversion/jpg-to-ppt/)
- [JPG TO PPTX](/slides/python-net/conversion/jpg-to-pptx/)
- [PNG TO PPT](/slides/python-net/conversion/png-to-ppt/)
- [PNG TO PPTX](/slides/python-net/conversion/png-to-pptx/)
- [PDF TO PPT](/slides/python-net/conversion/pdf-to-ppt/)
- [PDF TO PPTX](/slides/python-net/conversion/pdf-to-pptx/)
- [HTML TO PPT](/slides/python-net/conversion/html-to-ppt/)
- [HTML TO PPTX](/slides/python-net/conversion/html-to-pptx/)
