addPictureFrame produces IPictureFrame where getShapeStyle returns null

Presentation presentation = new Presentation();

ISlide currentSlide = presentation().get_Item(0);

IPPImage image = ... // Import an image

IPictureFrame picture = currentSlide.getShapes().addPictureFrame(ShapeType.Rectangle, 0, 0, 100, 100, image);

picture.getShapeStyle(); // always returns null

There is no way to set a default shape style.

Compare this to addAutoShape:

IAutoShape shape = currentSlide.getShapes().addAutoShape(ShapeType.Rectangle, 0, 0, 100, 100);

shape.getShapeStyle(); // doesn't return null

IPictureFrame and IAutoShape both inherit from IGeometryShape, which is where getShapeStyle is defined.

Is this a bug or planned behavior? Currently there is no way to add a fill or a colored border to an inserted image, which is possible in Powerpoint itself.

@noahbetzen,

I have observed the requirements shared by you and have not been able to completely understand that. Can you please elaborate in the form of a sample presentation and snapshot that what you want to achieve using Aspose.Slides. We will be able to investigate the issue further on our end to help you.

Here’s a minimal test repo I made to demonstrate the issue, along with accompanying PPTX and PNG files:

@noahbetzen,

I have worked with the sample code shared by you and have been able to observe the issue. An issue with ID SLIDESJAVA-37398 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as SLIDESJAVA-37398) have been fixed in this update.