Adjusting images on PPT

Hi

I want to adjust the product images in the slide, How can I do it using code? 

I want the image to look like this:

and not like this:


Attachment: Product_Comparison_February_2022.pptx_591fedfe.zip

3 Replies 1 reply marked as answer

MR Manikandan Ravichandran Syncfusion Team February 14, 2022 11:44 AM UTC

Hi Moran,

From the given details, we have found that you have inserted the image in the Presentation document with different heights and widths. So that, the image looks wider in the presentation document. To insert the image with proper width and height in the presentation document, we have prepared the sample and it can be downloaded from the below link.
https://www.syncfusion.com/downloads/support/forum/172837/ze/ConsoleApp3.1_F1728371204875682

In this sample, we have calculated the new height and width based on the given percentage and we can insert the image with these new height and width in required position.

Regards,
Manikandan Ravichandran 



MM Moran Monovich February 15, 2022 02:52 PM UTC

Hi

Can send me the solution with .net 6 configuration? I have m1 mac and .net core 3.1 is not supported. 

I see you used a third-party NuGet package to resize the image, Is there a way to avoid using this package and crop the image in a different way?



MR Manikandan Ravichandran Syncfusion Team February 16, 2022 01:51 PM UTC

Hi Moran,

We have prepared the sample in .net 6.0 framework and it can be downloaded from the below link.
https://www.syncfusion.com/downloads/support/forum/172837/ze/ConsoleApp1317068985

We have used SkiaSharp library for getting the original size of the image and this SkiaSharp library is recommend by Microsoft.

Also, we have used this library as a depend for Syncfusion.PresentationRenderer.Net.Core package to perform PPTX to PDF/Image conversion.

Regards,
Manikandan Ravichandran 


Marked as answer
Loader.
Up arrow icon