>> You might try checking NSImage's -isValid after loading it. >> >> - Joel >> >> On Nov 13, 2009, at 11:23 AM, Trygve Inda wrote: > > isValid returns YES > > Immediately afterwards calling > > [image drawInRect:myRect fromRect:imageRect operation:NSCompositeCopy > fraction:1.0]; > > Send this to the console: > > <Error>: Corrupt JPEG data: premature end of data segment > > The image IS corrupt, but I see no way to detect it. > > What a pain. >
Also... NSURL* imgURL = [NSURL fileURLWithPath:path]; CGImageSourceRef imgRef; CGImageSourceStatus imgStatus; imgRef = CGImageSourceCreateWithURL (imgURL, nil); CGImageSourceGetStatus (imgRef) returns kCGImageStatusComplete _______________________________________________ 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