# Convert PowerPoint Slides to PNG on Android

> Convert PowerPoint presentations to high-quality PNG images quickly with Aspose.Slides for Android via Java, ensuring precise, automated results.

Source: https://docs.aspose.com/slides/androidjava/convert-powerpoint-to-png/
Updated: 2026-08-05


## **Overview**

This article explains how to convert PowerPoint presentations to PNG images using Aspose.Slides. It shows how to load presentation files in formats such as PPT, PPTX, and ODP, render slides as images, and save the results in PNG format.

The article also demonstrates how to customize the generated PNG images by setting scale values or specifying the desired width and height.

## **Convert PowerPoint to PNG**

Go through these steps:

1. Instantiate the [Presentation](https://reference.aspose.com/slides/androidjava/com.aspose.slides/Presentation) class.
2. Get the slide object from the [Presentation.getSlides()](https://reference.aspose.com/slides/androidjava/com.aspose.slides/Presentation#getSlides--) collection under the [ISlide](https://reference.aspose.com/slides/androidjava/com.aspose.slides/ISlide) interface.
3. Use a [ISlide.getImage()](https://reference.aspose.com/slides/androidjava/com.aspose.slides/ISlide) method to get the thumbnail for each slide.
4. Use the  [**IImage.save(String formatName, int imageFormat)**](https://reference.aspose.com/slides/androidjava/com.aspose.slides/IImage#save(String formatName, int imageFormat)) method to save the slide thumbnail to the PNG format.

This Java code shows you how to convert a PowerPoint presentation to PNG:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    for (int index = 0; index < pres.getSlides().size(); index++)
    {
        ISlide slide = pres.getSlides().get_Item(index);
        IImage slideImage = slide.getImage();
        try {
              slideImage.save("image_java_" + index + ".png", ImageFormat.Png);
        } finally {
             if (slideImage != null) slideImage.dispose();
        }
    }
} finally {
    if (pres != null) pres.dispose();
}
```

## **Convert PowerPoint to PNG with a Custom Scale**

If you want to obtain PNG files around a certain scale, call the `getImage(float scaleX, float scaleY)` overload. The arguments are scale factors applied to the slide size, so a slide of 720×540 points rendered with `scaleX = 2` and `scaleY = 2` produces a 1440×1080 pixel image. 

This code in Java demonstrates the described operation:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    float scaleX = 2f;
    float scaleY = 2f;
    for (int index = 0; index < pres.getSlides().size(); index++)
    {
        ISlide slide = pres.getSlides().get_Item(index);
        IImage slideImage = slide.getImage(scaleX, scaleY);
        try {
              slideImage.save("image_java_" + index + ".png", ImageFormat.Png);
        } finally {
             if (slideImage != null) slideImage.dispose();
        }
    }
} finally {
    if (pres != null) pres.dispose();
}
```

## **Convert PowerPoint to PNG with Custom Size**

If you want to obtain PNG files of a certain size, pass a `java.awt.Dimension` with your preferred width and height to the `getImage(Dimension size)` overload. The resulting image has exactly those pixel dimensions. 

This code shows you how to convert a PowerPoint to PNG while specifying the size for the images: 

```java
import com.aspose.slides.*;
import java.awt.Dimension;

Presentation pres = new Presentation("pres.pptx");
try {
    Dimension size = new Dimension(960, 720);
    for (int index = 0; index < pres.getSlides().size(); index++)
    {
        ISlide slide = pres.getSlides().get_Item(index);
        IImage slideImage = slide.getImage(size);
        try {
              slideImage.save("image_java_" + index + ".png", ImageFormat.Png);
        } finally {
             if (slideImage != null) slideImage.dispose();
        }
    }
} finally {
    if (pres != null) pres.dispose();
}
```

## **FAQ**

### How can I export only a specific shape (e.g., chart or picture) rather than the whole slide?

Aspose.Slides supports [generating thumbnails for individual shapes](/slides/androidjava/create-shape-thumbnails/); you can render a shape to a PNG image.

### Is parallel conversion supported on a server?

Yes, but [don’t share](/slides/androidjava/multithreading/) a single presentation instance across threads. Use a separate instance per thread or process.

### What are the trial-version limitations when exporting to PNG?

The evaluation mode adds a watermark to output images and enforces [other restrictions](/slides/androidjava/licensing/) until a license is applied.

