ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: juju22 on January 04, 2014, 11:32:00 AM

Title: exiftool and corrupt images?
Post by: juju22 on January 04, 2014, 11:32:00 AM
Hello and Happy new year everyone!

While merging my photos collections and making some cleaning, I'm trying to make a batch check for corrupted images. I found here
http://www.commandlinefu.com/commands/view/2352/find-corrupted-jpeg-image-files

the command 'exiftool -warning {}'

My first question: is it a good way to check for corrupted images? or only corrupted metadata ?

Else, my little problem to optimize output

find . -iname "*.jpg" -exec exiftool -warning {} \; >> $log   


=> no filename displayed (but exiftool see one file at a time)
got


Warning                         : Unlisted FPXR segment (index 3)
Warning                         : Unlisted FPXR segment (index 3)
Warning                         : Unlisted FPXR segment (index 3)
Warning                         : Suspicious IFD0 offset for XResolution
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by 3208?)
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by 58?)



find . -iname "*.jpg" -print0 | xargs -0 exiftool -warning >> $log


=> all filenames displayed, with or without warnings

any options to get filename only for files where there is a warning?

Thanks a lot
Title: Re: exiftool and corrupt images?
Post by: Phil Harvey on January 04, 2014, 01:14:36 PM
ExifTool does no image validation.  It only reports some metadata and structural problems.  See FAQ number 25 (https://exiftool.org/faq.html#Q25).

The command to print names of files with warnings could be:

exiftool -p '$directory/$filename' -if '$warning' -r .

or if you only want to check JPG images, this is easier than using 'find':

exiftool -p '$directory/$filename' -if '$warning' -r -ext jpg .

- Phil
Title: Re: exiftool and corrupt images?
Post by: atescula on January 28, 2018, 05:35:45 AM
Hello Phill
exiftool is great and saved my time and photo collection
Congrats for your great work !

Any clue please about finding photos with errors (warning) AND move them to a separate folder ? (linux)
Thanks a lot for support
Title: Re: exiftool and corrupt images?
Post by: Phil Harvey on January 28, 2018, 09:00:07 AM
The command would be:

exiftool -if '$warning or error' -directory=SOME_OTHER_DIRECTORY -r DIR

- Phil
Title: Re: exiftool and corrupt images?
Post by: atescula on January 28, 2018, 12:14:12 PM
Thanks a lot.
I am impressed about the quick help you provide. Amazing support.
Regards,
Andrei