Scan folders for corupted jpegs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Enko
Posts: 3
Joined: 2016-01-19T05:46:34-07:00
Authentication code: 1151

Scan folders for corupted jpegs

Post by Enko »

Hi,

I would like to scan the whole folder for corupted images. I know it is possible to do that with this command in the desired folder:
identify -verbose -regard-warnings *.jpg
But it takes tooo much time, it writes back all the information about all the images. But i want just to get info which images are corrupted.
I found this by Google:
find . -name \*.jpg -exec identify -verbose -regard-warnings {} >/dev/null "+"
but it does not work for me.
Do you have any idea how to do that?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Scan folders for corupted jpegs

Post by snibgo »

Perhaps a convert would be faster, while reporting errors, eg

Code: Select all

convert in.jpg info:
snibgo's IM pages: im.snibgo.com
Enko
Posts: 3
Joined: 2016-01-19T05:46:34-07:00
Authentication code: 1151

Re: Scan folders for corupted jpegs

Post by Enko »

Thank you, i tried that. It might be faster but it didn't recognize images corrupted in the midle, which
"identify -verbose -regard-warnings *.jpg" recognized. And that is what i need -to be able to- recognize corrupted images. But thank you anyway.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Scan folders for corupted jpegs

Post by fmw42 »

What is your IM version and platform? Please always provide that and if possible an example image.
Enko
Posts: 3
Joined: 2016-01-19T05:46:34-07:00
Authentication code: 1151

Re: Scan folders for corupted jpegs

Post by Enko »

I have the current release ImageMagick 6.9.3-1, OS Windows. The image was originally ok, for the testing i changed it with Hex editor, so it has visible damage (it seems i cant add atachments here)-
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Scan folders for corupted jpegs

Post by fmw42 »

You can upload your image to some free hosting service such as dropbox.com and put the URL here.
Post Reply