python-pptx icon indicating copy to clipboard operation
python-pptx copied to clipboard

Fitting images to placeholder

Open anki-xyz opened this issue 10 years ago • 20 comments

Dear all,

I know that images are cropped to fit the placeholder container width and height. However, I'd like to use something like an automatic adjustment, meaning, if I load an image into the placeholder, the image should be resized/scaled to fit the placeholder having the aspect ratio locked. I was playing around with the placeholder.py file: Removing the cropping resizes the image to the full container width and height, however, when setting the width and height of the placeholder inside of that function, nothing happens. When setting the width after adding the image manually, the images disappear from the slide.

It would be great if there would a solution.

Thanks a lot for the help best anki

anki-xyz avatar Sep 02 '15 12:09 anki-xyz