Adding picture problem

I have a picture that I want to add to a slide, the dimension of the picture is 1440x1080

When I try to add it using this

slide.getShapes().addPictureFrame(ShapeType.Rectangle, 0, 0, imgx.getWidth(), imgx.getHeight(), imgx);

It exceeds the dimensions of the slide.

Is there a way to fix this problem?

Found that this approach is kind of fixing my problem. A suggestion that doesn’t involve using a table?


double[] dblCols = {720};
double[] dblRows = {540};
ITable tbl = slide.getShapes().addTable(0, 0, dblCols, dblRows);
ICell cell = tbl.getRows().get_Item(0).get_Item(0);
cell.getFillFormat().setFillType(FillType.Picture);
cell.getFillFormat().getPictureFillFormat().getPicture().setImage(imgx);

Hi Alex,


I have observed your comments. Please check this thread link. I hope this will help you to achieve your requirements. Please share feedback with us if there is still an issue.

Best Regards,

Thanks that worked great

Hi Alex,


You are very welcome.

Best Regards,