I am downloading an image from the server and sometimes I get an image that
is only the first half of the data, either because of a lost connection to
the server or the file being replaced on the server while I am downloading.

Opening in preview, generates a console message:

Corrupt JPEG data: premature end of data segment

However, the image renders ok - except the bottom half is solid grey. How
can I detect in code that there is a "premature end of data segment" since

imageWithContentsOfFile:@"a.jpg"  works ok to build an image, albeit with a
grey block in half or a quarter of the image.

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/archive%40mail-archive.com

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

Reply via email to