Re: Getting image info without loading entire image
Re: Getting image info without loading entire image
- Subject: Re: Getting image info without loading entire image
- From: Ken Tozier <email@hidden>
- Date: Fri, 19 Jan 2007 14:20:33 -0500
On Jan 19, 2007, at 1:56 PM, Kaelin Colclasure wrote:
Hi Ken,
I missed the earlier messages in this thread, but... is there a
reason why you're trying to load and run the importer instead of
simply asking Spotlight for the attributes directly?
The initial question dealt with quickly fetching the width and height
of images and Gregory suggested loading the Image.md importer.
MDItemRef item = MDItemCreate(kCFAllocatorDefault, inPath);
if (item != NULL) {
CFArrayRef attributeNames = MDItemCopyAttributeNames(item);
CFDictionaryRef attributes = MDItemCopyAttributes(item,
attributeNames);
// ...
}
I just tried that and it sort of works, but unfortunately it doesn't
expose the image width and height, just the generic file properties
(name, size, mode date etc)
I notice in Spotlight that image width, height etc info is available.
Any idea how to get at this more specific image info?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden