How do I find and remove corrupt images from directory?

2

I downloaded a bunch of images off a web server (70,000 or so) from a website I am working on and a fairly large number of them are corrupt but not empty.

I can see the corrupt ones as thumbnails in a folder as they have no thumbnail image view and delete them but due to the large volume of files its going to take forever!

Is there any way to either search a folder for corrupt images or some sort of software I can use to clean up a directory containing images?

I have a windows PC.

Jeffrey Jenkinson

Posted 2013-03-08T15:31:39.967

Reputation: 121

Question was closed 2013-03-10T13:10:02.383

Are these images all the same format (jpeg, gif, bmp, etc.)? – CharlieRB – 2013-03-08T16:08:06.680

Yeah they are all jpegs. – Jeffrey Jenkinson – 2013-03-08T17:50:03.743

Possible duplicate of Automating the scanning of graphics files for corruption. Also see Incomplete jpg or image files?

– Karan – 2013-03-10T00:42:34.823

Answers

3

In Windows Explorer, go into Details view and select lots of the image-specific (and, ideally, JPEG-specific) columns: Dimensions, Bit depth, Camera maker, Camera model, Date taken, Exposure time, Focal length, F-stop, ISO speed, etc.  Look for a column where the valid images consistently have a non-blank value and the corrupt images are blank; then filter on that column.

To be safe, don’t delete them right away.  Drag them into a “Corrupt Images” folder, and then switch that folder into an image/thumbnail view to ensure that you didn’t pick up any good images.  (Then delete them.)

Scott

Posted 2013-03-08T15:31:39.967

Reputation: 17 653

This worked for me. After sorting the images on the missing column (just one field was enough) I selected image view, so I could verify that the images with the missing field were indeed corrupt. – pauldendulk – 2016-12-27T11:02:22.307

1This assumes that the JPEGs have EXIF data. What if they don't? – Karan – 2013-03-10T00:31:42.247