Convert PNG to PPTX in Java
Powerful cross-platform Java API for converting PNG to PPTX using Java code
Convert PNG to PPTX using Aspose.Slides
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 PNG to PPTX, you are essentially creating a PowerPoint presentation that contains slides based on PNG images.
Convert PNG to PPTX in Java
Using Aspose.Slides for Java , you can convert PNG image to PowerPoint presentation with just a few lines of code:
Java code for converting PNG to PPTX
Presentation pres = new Presentation();
try {
ISlide slide = pres.getSlides().get_Item(0);
IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.png")));
slide.getShapes().addPictureFrame(ShapeType.Rectangle, 10, 10, 100, 100, image);
pres.save("pres.pptx", SaveFormat.Pptx);
} finally {
if (pres != null) pres.dispose();
}
How to convert PNG to PPTX in Java
Install Aspose.Slides for Java. See Installation .
Add the library as a reference in your project.
Create an instance of the Presentation class.
Load the PNG image you want to convert to PPTX.
Save the resulting file as a PPTX presentation.
Free Online Converter
Other Supported PowerPoint Conversions
You can also convert files in other formats to PowerPoint