Powerpoint->Impress: Fix wrong image aspect ratio, or how to troubleshoot?

I recently moved from Powerpoint to LibreOffice Impress. Still figuring out the migration pains. I was able to open a large Powerpoint 2007 album, but many of the images had wrong aspect ratios. Almost all of the images are linked images, i.e., they merely specify an image file in the same folder as the *.pptm/x file. I know that the *.pptx/m files are actually zipped up XML representations of the presentation contents, so I snooped around the files. Each slide has an XML file wherein the paths for the linked images on the slide are specified. Each image also has a panoply of XML tags, one of which was noChangeAspect=“1”. Obviously this specifies that the aspect ratio of the image should not change, presumably in the face of resizing and possibly cropping. The aspect ratios are fine in Powerpoint.

I did some quick sanity checks using unix text munging tools (sed, grep, wc). I found that there are 768 images from counting tags <p:pic>, and there are also 768 occurrences of noChangeAspect=“1”. Every image has a specification to preserve the aspect ratio. With that many images, I believe that I am seeking an automated fix to all images in the album.

I’m currently speculating that Impress’s XML ingestor is getting confused by cropped images, and perhaps not preserving the aspect ratio correctly. Just a wild guess as to a plausible cause. I looked in the Impress properties for images, and there is a check box for preserving aspect ratio, but it is not useful preserving an aspect ratio that is already wrong. There are no fields indicating whether the aspect ratio is changed relative to the linked image file.

I’m not sure how to go about checking all the images and fixing them. Short of noting the linked file (not sure how to do that yet), deleting the image from the slide, re-inserting a link to the image file, re-cropping, and resizing. I am also not a developer nor a data engineer.

Can anyone suggest an approach to (1) checking correctness of the aspect ratio of the 768 images and (2) fixing them in a less manually intensive way than in the preceding paragraph?

Thanks.