Thanks for inquiring Aspose.Slides.
I have observed your requirements and will try to answer them separately.
There is a way to detect if same image is imported several times in a presentation?
Aspose.Slides automatically internally optimize the image addition in presentation process by avoiding addition of duplicate images in Presentation.Images collection. So, for any image if already added, its second instance will not be added in Image Collection and there will be only one import for any image in Image Collection but that image may be used many times inside presentation.
How to correctly detect shapes that are coming from master slide? I want to create a small program that extracts all the shapes that are visible on a particular slide (imported from master or imported directly in that slide).
I like to share that every slide has a method, Slide.getShowMasterShapes(), which if returns true means that slide inherit shapes from its respective LayoutSlide and Header/Footer from master slide (since they are defined on master slide level). In case of true returned from Slide.getShowMasterShapes(), you need to traverse the shapes inside respective LayouSlide for extraction.
I hope this will clarify the concept. For your kind reference, I have attached the working sample code, source and generated presentations exhibiting shapes access and same image addition multiple times in Presentation.Images collection.
Aspose - File Format APIs
Keep in touch! We’re on Twitter and Facebook
TestShapes.zip (266.8 KB)