Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
bdavi19  
#1 Posted : Friday, March 6, 2009 2:58:43 AM(UTC)
bdavi19

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 14

Hello,

I was just wondering if there was an easy way to tell if an image is damaged or corrupted. One test I have is to open the image with the LosslessJpegTransform. However, this doesn't catch all of the corrupted images. Another test that does catch them is writing the image to a memory stream or to disk. However, this is very processor intensive and running this test on every image that comes through (potentially thousands) isn't viable.

So, my question is: Is there a simple way to tell if an image is corrupt? Perhaps some key or hash that can be checked?

Thanks,

Brad

Dmitry  
#2 Posted : Tuesday, March 10, 2009 4:13:54 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello Brad,

Unfortunately the most of image formats are buld in the way that you cannot know whether it is corrupted or not before you read the image from beginning to end.

Graphics Mill catches all exceptions during image decoding and throws MediaCorruptedException in the case if there are problems with image integrity. So the only way to check it is to load an image into memory using decoder.

I realize that it is high resources-cost approach but there is no another way to be sure that image is not corrupted.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.