My test PPTX has just one 3D Model object. When I call presentation.getImages().get_item(0) I get the image that represents the 3D Model and I can save that as a PNG file.
However, when I get the slide and the shape (3D Model) it returns com.aspose.slides.GraphicalObject but I cannot find a way to get the image from it. It also doesn’t have any reference to the image that I get from the last step. How do I get an image for a 3D Model object?
This is a code snippet:
Presentation presentation = new Presentation("C:\\Temp\\test.pptx");
IPPImage image = presentation.getImages().get_Item(0);
FileOutputStream fos = new FileOutputStream("C:\\Temp\\image1.png");
fos.write(image.getBinaryData());
fos.close(); // Saved the image. This part is fine.
IShape shape = presentation.getSlides().get_Item(0).getShapes().get_Item(0);
System.out.println(shape.getClass().getName()); // prints com.aspose.slides.GraphicalObject
// Now, I cannot get the image from this shape object.
I can upload my test PPTX but it’s just a simple one slide presentation with a 3D Model object.
Thank you,
Robert.