Convert JPG to PPT in Java

Convert JPG images to PPT presentations using Aspose.Slides for Java without Microsoft PowerPoint.

Convert JPG to PPT using Aspose.Slides

Aspose.Slides for Java is a presentation processing API that can add JPG images to slides and save the result as a PPT presentation.

Convert JPG to PPT in Java

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

Java code for converting JPG to PPT

Presentation presentation = new Presentation();
try {
    ISlide slide = presentation.getSlides().get_Item(0);

	byte[] imageData = Files.readAllBytes(Paths.get("image.jpg"));
    IPPImage presentationImage = presentation.getImages().addImage(imageData);
    slide.getShapes().addPictureFrame(ShapeType.Rectangle, 0, 0, 720, 540, presentationImage);

    presentation.save("presentation.ppt", SaveFormat.Ppt);
} finally {
    presentation.dispose();
}

How to convert JPG to PPT in Java

  1. Install Aspose.Slides for Java. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the JPG image as an IPPImage.

  5. Save the resulting file as a PPT presentation.

Free Online Converter

Convert presentations and slides online.

Other Supported PowerPoint Conversions

You can also convert files in other formats to PowerPoint.