Convert Image to PPT in Java

High-speed and cross-platform Java Library that helps in developing applications with the ability to create, merge, inspect, or convert Microsoft PowerPoint and OpenOffice presentation files without the use of any software like Microsoft or Open Office, Adobe PDF.

Convert Image to PPT using Java

Aspose.Slides for Java is a powerful Java library used to create, convert, and manipulate PowerPoint presentations, PDFs, HTML docs, and other files. When you convert image to PPT, you are essentially creating a PowerPoint presentation that contains slides based on those images.

Convert image to PPT in Java

Using Aspose.Slides for Java , you can convert image to PowerPoint presentation with just a few lines of code:

Java code for converting image to PPT


Presentation pres = new Presentation();
try {
    ISlide slide = pres.getSlides().get_Item(0);
	IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.jpg")));
	slide.getShapes().addPictureFrame(ShapeType.Rectangle, 0, 0, 720, 540, image);
    pres.save("presentation.ppt", SaveFormat.Ppt);
} finally {
    if (pres != null) pres.dispose();
}

How to convert Image to PPT using Aspose.Slides for Java API

These are the steps to convert Image to PPT in Java.

  1. Install Aspose.Slides for Java .

  2. Add a library reference (import the library) to your Java project.

  3. Create an instance of the Presentation class.

  4. Load the image you want to convert to PPT.

  5. Save the resulting file as a PPT presentation.

Free Online Converter

How to Convert PPT to HTML in Python

Other Supported PowerPoint Conversions

You can also convert files in other formats to PowerPoint