-
Feb 5th, 2023, 05:32 AM
#1
Thread Starter
Hyperactive Member
Need help finding corrupy image files
sometimes i find jpg images that are not complete.
ie if i open the file then i may only get half a picture.
is there any way to know progmatically that the file is corrupt.
ie search for corrupt files
tks
-
Feb 5th, 2023, 08:17 AM
#2
Re: Need help finding corrupy image files
It's technically not corrupt if it can be opened without error.
I don't know what your exact circumstances are but the traditional way to detect errors in files is to use hashing. You hash the original file and if the hash of any copy doesn't match the hash of the original, then it means there was corruption but like I said, I don't know what your circumstances are. I don't know if you have an un-corrupted original version to use for comparison.
I think you need to provide some context for your question.
-
Feb 5th, 2023, 08:37 AM
#3
Thread Starter
Hyperactive Member
Re: Need help finding corrupy image files
Originally Posted by Niya
It's technically not corrupt if it can be opened without error.
I don't know what your exact circumstances are but the traditional way to detect errors in files is to use hashing. You hash the original file and if the hash of any copy doesn't match the hash of the original, then it means there was corruption but like I said, I don't know what your circumstances are. I don't know if you have an un-corrupted original version to use for comparison.
I think you need to provide some context for your question.
tks for reply. so i have lots of photos that were at one stage on an sd card. these were copied a long time ago.
At some point the sd card had curruption and some images are not complete.
They open but only have partial image.
But some cannot be opened in Irfanview and gives error msg
Attachment 186894 with 5.50MB taken up
How would i detect this same error in VB
currently my app shows no image and image has no Dimesions. would it be fair to say i can rely on the dimensions being Zero
tks
-
Feb 5th, 2023, 09:40 AM
#4
Re: Need help finding corrupy image files
The ones that cannot be opened are easy. You just trap the error in VB6 using On Error Goto traps.
The ones that can be opened I guess you could test for oddities like 0 length dimensions.
-
Feb 5th, 2023, 03:38 PM
#5
Hyperactive Member
Re: Need help finding corrupy image files
Upload one of your corrupted JPG files (a small one is preferred); I would like to see if I can spot the cause.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|