Real size of image from clipboard

I have some images in Powerpoint for which I want to know the real size in pixels and then calculate the resolution.
For an image imported at 300 ppi and 240x108 mm, I get 680x306 pixels.
Those are the number of pixels for a 72 ppi resolution.
The same image in InDesign returns 2835x1272 px.

use scripting additions
use framework "Foundation"
use framework "AppKit"

set thePast to current application's NSPasteboard's generalPasteboard()
set theData to ((thePast's pasteboardItems()'s objectAtIndex:0)'s dataForType:"public.tiff")'s mutableCopy()
set rep1 to (current application's NSBitmapImageRep's imageRepWithData:theData)
set rep2 to current application's NSImageRep's imageRepWithPasteboard:thePast

Can some one help me on this?
THX.

Why are you going through the clipboard?

Because those images are embedded in the document and there’s no file on disk.

There are two image rep properties: pixelsHigh and pixelsWide.

Yes. They return (in this case) the lower resolution size (72 ppi).

The pixel dimensions of images shouldn’t change on a file wether you’re looking at it at 72ppi or 300ppi, while you will see the measured dimensions change (mm since you mentioned that in your post). Perhaps PowerPoint is returning the displayed image’s dimensions instead of the linked image’s full dimensions?
2020-09-17_11-26-30 2020-09-17_11-27-10 2020-09-17_11-26-43

Hi Sean,

Thank you for your interest.
I know the difference between the size of an image in pixels and its representation at a given resolution.

I suspect PowerPoint is the culprit.
I think it’s returning only the preview of the image in readable pasteboard types (tiff & pdf).
The image at its full size can be in one of the 5 dynamic types (dyn.ah62d4qmxh…) returned by the pasteboard.