I seem to remember having seem some code that checked with a one-liner whether a file path is an image that could be loaded by NSImage's initWithContentsOfFile:, before actually going ahead and doing the initWithContentsOfFile:

Now, I can't remember that one-liner, and I don't see why I couldn't just do a initWithContentsOfFile, and then check whether it returned nil.

Any comments and insights will be appreciated.

Best regards,
Gabriel.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

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

Reply via email to