I want to measure the amount of empty space on a slide (in order to overcome slide overcrowding) in a PowerPoint Add-In. Having access to each shape on a slide, I was planning to calculate the amount of area each shape takes and then subtract it from the total area available. I was wondering if this is the most efficient method, or if could use something else, eg. using image processing techniques.
Unless you know that the slide background will always be plain/solid color, I don't think image processing techniques would help, and would probably necessitate exporting each slide as an image, which'd be more time consuming that stepping through the shapes on each slide.
Summing the area occupied by each shape and comparing it to the overall slide size would be a good rough answer. To do a better job, you'd want to account for overlapping shapes; two squares, one atop the other, would only occupy the area of one of them, assuming they're the same size. You may also want to consider the shapes on each slide's layout, and you'd want to test placeholder shapes to see if they're empty or not; they occupy space in editing views, but if empty, won't appear in printouts or slide shows.