Re: How to get Extended File Info


Jon Gotow
 

On Jun 6, 2019, at 9:04 AM, Dave <dave@...> wrote:

Spotlight, I can’t seem to find any reference to how to get this extended documentation any where.

Surely then must be a Higher Level method to do this simple task?
In Obj-C (getting width and height of an image in pixels):

NSMetadataItem *mdItem = [[NSMetadataItem alloc] initWithURL:url];
NSDictionary *dict = [mdItem valuesForAttributes:@[NSMetadataItemPixelWidthKey, NSMetadataItemPixelHeightKey]];

- Jon

Join cocoa@apple-dev.groups.io to automatically receive all group messages.