AP.
AP.

Reputation: 5323

Get metadata of file in objective-c / cocoa

I would like to get the metadata (if this is an image, the size for instance) using objective-c.

Do you knwo how I can achieve this?

Thanks and regards,

Upvotes: 0

Views: 1568

Answers (1)

Vladimir
Vladimir

Reputation: 170819

Methods depend on what you need exactly.

File properties can be retrieved from the file itself (e.g. file size etc) - use attributesOfItemAtPath:error: method in NSFileManager for that.

If you want to get image properties you can use CGImageSource... set of functions. You can find thorough tutorial on how it can be done here

Upvotes: 1

Related Questions