Hi!
I added a picture to a table cell with
final IPPImage imgEx = workingSlide.getPresentation().getImages().addImage(img);
cell.getFillFormat().setFillType(FillType.Picture);
cell.getFillFormat().getPictureFillFormat().setPictureFillMode(PictureFillMode.Stretch);
as there is no PictureFillMode like “keepProportions” or something like that, I need to do this in another way without cutting off parts of the image.
In Powerpoints itself there’s the option to set a crop factor (see image attachment - sorry it’s german). How can I do this with Aspose.slides?
Best regards,
Christiane
Hi Christiane,
The issues you have found earlier (filed as SLIDESJAVA-35272) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Is there a solution to this issue yet?
Hi Ashwin,
I have observed your inquiry and like to share that similar post has been shared by you in another forum thread as well and response has been shared with your over this forum link.
Many Thanks,
With the other forum, the image doesn’t retain its size and is stretched out within the table cell. I was wondering if there is a way to maintain the properties of the image within the cell so it is not stretched out? (And not using tile either).
Hi Ashwin,
Hi Ashwin,
I have observed the sample code shared by you and suggest you to please try using following alternate code for cropping image on your end to serve the purpose. I hope this will be helpful. If there is still an issue then please share the sample source presentation, generated presentation and desired output presentation. We will be able to investigate the issue further on our end once requested information will be shared.
final IPPImage imgEx = workingSlide.getPresentation().getImages().addImage(img);
cell.getFillFormat().setFillType(FillType.Picture);
cell.getFillFormat().getPictureFillFormat().setPictureFillMode(PictureFillMode.Stretch);
//Crop the image
cell.getFillFormat().getPictureFillFormat().setCropLeft(-30f);
cell.getFillFormat().getPictureFillFormat().setCropRight(-30f);
Many Thanks,
With that solution, the background of that cell then becomes white despite the rest of the table being a different color. Is there any solution to that as of now?
Hi Ashwin,