# Convert PPSM to PNG in Python

> Convert PPSM presentation slides to PNG images in Python with Aspose.Slides for Python via Java.

Source: https://products.aspose.com/slides/python-java/conversion/ppsm-to-png/
Updated: 2026-07-22



## Convert PPSM to PNG in Python

[Aspose.Slides for Python via Java](/slides/python-java/) can render slides from a macro-enabled PowerPoint slide show (`.ppsm`) as PNG images without Microsoft PowerPoint. Because a PNG file stores a single image, the conversion creates a separate output file for each slide. Macros and interactive behavior are not included in the images.

Use `Presentation.getSlides` to iterate through the source slides. For each `Slide`, call `getImage` and save the returned image with `ImageFormat.Png`. The scaling values passed to `getImage` control the output dimensions relative to the original slide size.

## How to Convert PPSM to PNG in Python

Load the PPSM file into a `Presentation`, render each slide with `getImage`, and save each result in PNG format.

### Python code for converting PPSM slides to PNG

```python
presentation = Presentation("presentation.ppsm")
try:
    slide_count = presentation.getSlides().size()

    for slide_index in range(slide_count):
        slide = presentation.getSlides().get_Item(slide_index)
        slide_image = slide.getImage(2.0, 2.0)
        try:
            slide_number = slide_index + 1
            file_path = f"slide-{slide_number}.png"
            slide_image.save(file_path, ImageFormat.Png)
        finally:
            slide_image.dispose()
finally:
    presentation.dispose()
```

## Steps to Convert PPSM to PNG in Python

The conversion renders each slide in the PPSM presentation to a separate PNG image.

Install [Aspose.Slides for Python via Java](/slides/python-java/).

Configure JPype and make the Aspose.Slides package available to your Python project.

Create a `Presentation` from the source `.ppsm` file and determine the slide count.

Access each `Slide`, call `getImage`, and save the result with `ImageFormat.Png`.

## Convert PPSM to Other Supported Formats

- [PPSM TO PPTX](/slides/python-java/conversion/ppsm-to-pptx/)
- [PPSM TO PPT](/slides/python-java/conversion/ppsm-to-ppt/)
- [PPSM TO PDF](/slides/python-java/conversion/ppsm-to-pdf/)
- [PPSM TO HTML](/slides/python-java/conversion/ppsm-to-html/)
- [PPSM TO BMP](/slides/python-java/conversion/ppsm-to-bmp/)
- [PPSM TO JPG](/slides/python-java/conversion/ppsm-to-jpg/)
- [PPSM TO FODP](/slides/python-java/conversion/ppsm-to-fodp/)
- [PPSM TO GIF](/slides/python-java/conversion/ppsm-to-gif/)
- [PPSM TO ODP](/slides/python-java/conversion/ppsm-to-odp/)
- [PPSM TO OTP](/slides/python-java/conversion/ppsm-to-otp/)
- [PPSM TO POT](/slides/python-java/conversion/ppsm-to-pot/)
- [PPSM TO POTM](/slides/python-java/conversion/ppsm-to-potm/)
- [PPSM TO POTX](/slides/python-java/conversion/ppsm-to-potx/)
- [PPSM TO PPS](/slides/python-java/conversion/ppsm-to-pps/)
- [PPSM TO PPSX](/slides/python-java/conversion/ppsm-to-ppsx/)
- [PPSM TO PPTM](/slides/python-java/conversion/ppsm-to-pptm/)
- [PPSM TO SVG](/slides/python-java/conversion/ppsm-to-svg/)
- [PPSM TO TIFF](/slides/python-java/conversion/ppsm-to-tiff/)
