Created attachment 32974 [details] patch with proposed changes This functionality is useful when using placeholder anchor information when placing images. (pseudo-)code example: // content placeholders LinkedList<XSLFTextShape> placeContent = ...; LOOP: { XSLFShape place = placeContent.poll(); Rectangle2D anchor = place.getAnchor(); slide.removeShape(place); XSLFPictureShape shape = slide.createPicture ( slide.getSlideShow().addPicture ( ... ) ); shape.resize(anchor, RectAlign.TOP_RIGHT); } Depends on #58207
Thank you for the patch - applied with r1704206 I've moved the functionality to Common SL, i.e. DrawPictureShape. As the X/HSLF classes only implement an interface, opposed to abstract base classes of X/HSSF, I needed to find a location to place the code. As resize is kind of drawing related, I though DrawPictureShape is a good place. Apart of that I've reworked the PictureData.getImageDimension() - now the size is returned in points, as all other methods return points too.