How to reduce memory consumption when adding a large amount of images to a slide

Hello,


I have to add around 100 images to a single slide. Each PNG has about 1 MB file size.
When gernating a PPTX and adding the images to the slide via:

IPresentation.Images.AddImage(File.OpenRead(pathToFile));

the process needs 10 MB system memory for each file added, so the application runs out of memory.

How can I optimize this behaviour? (Version 14.2.0)

Best regards,
Daniel

Hi Daniel,

Thank you for the details.

Please share some sample images with us which you are adding in presentation file and are facing the performance issues. We will check them and will get back to you soon.

Thanks & Regards,