You might try checking NSImage's -isValid after loading it.

- Joel

On Nov 13, 2009, at 11:23 AM, Trygve Inda wrote:

> I use:
> 
> imageWithContentsOfFile:@"a.jpg"
> 
> And sometime it generates a console message:
> 
> Corrupt JPEG data: premature end of data segment
> 
> How can I use an observer/exception handler or other notification to detect
> such messages as NSImage accepts this image as valid when it is not.
> 
> Something deeper in the OS knows the problem and I'd like to be notified.
> 
> Thanks,
> 
> Trygve
> 
> 
> _______________________________________________
> 
> 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/joel_levin%40apple.com
> 
> This email sent to joel_le...@apple.com

_______________________________________________

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