1) There's also MagicKit, an Obj-C wrapper around libmagic: 
https://github.com/aidansteele/MagicKit

2) If you just want to know if something is an image, just try loading it:
    [[NSImage alloc] initWithData:data]
If -initWithData: returns nil, it is not an image.

Jakob

On 28.09.2013, at 23:29, Charles Srstka <cocoa...@charlessoft.com> wrote:

> On Sep 28, 2013, at 4:17 PM, Devarshi Kulshreshtha 
> <devarshi.bluec...@gmail.com> wrote:
> 
>> 1. Is there any other way to identify file extension for the files without
>> extensions, say from NSData object?
> 
> Have a look at the files in /usr/share/file/magic/ to get some ideas of how 
> to identify various types of files.
> 
> Charles
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please 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:
> https://lists.apple.com/mailman/options/cocoa-dev/jakob%40eggerapps.at
> 
> This email sent to ja...@eggerapps.at


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to