Jump to content

Find corrupted image files


Recommended Posts

I have an old account but haven't visited here in years. Forgive me if I'm not doing this right.

 

QUESTION: How can I identify any corrupted images out of 365,000 before I archive them?

 

Would this solution work; use IrfanView to load all the images as thumbnails and inspect them in bulk?

 

Does IrfanView load the actual image or just the embedded JPG?

 

Do you have other, better solutions?

 

Thank you for your time

 

Larry

Link to comment
Share on other sites

May I suggest that you first create and uniquely name (could just be numeric) sub folders, then copy a maximum of 5000 of these images into the sub-folders in whatever order you choose, so that the originals are still intact. In my experience, IrfanView works best with around this number of images, both to load and to display. Not knowing the format of your images, specific information is perforce difficult to give, but in my limited experience both DNG (or PEF) files and JPG are obvious when corrupted, and if IrfanView will not load them, with a limited number it is fairly easy to discover which have not been loaded, and are, by inference, too corrupt to load.

 

HTH

Link to comment
Share on other sites

Well I started this project before you mentioned this, I naively I just asked IrfanView to load all 365,000 files from my top directory down. So far it's up to 101,000 and hasn't slowed down. If I visually inspect the thumbnails in bulk, I think I can spot any corrupted images pretty quick. Or maybe IrfanView will refuse to load a corrupted image. Either way I should be able to identify any problematic files. Right?

 

I have a mix of file types; NEF, JPG, DNG, TIFF, PSD, RAF, and others.

Link to comment
Share on other sites

o_O Have fun!

 

At least, you'd better make yourself believe it's fun.

 

Even though it's maybe still loading, over 300,000 files is a lot of file management. I'd suggest that before you tackle the MASS media, you do something like Tony's suggestion to fine tune the process and see how it works in practice....

 

If I were your computer and drives, I'd be cringing in a corner somewhere.

Edited by JDMvW
Link to comment
Share on other sites

Some years ago, I had prints made from a picture on a USB stick.

(At a nearby camera store, that is now a pizza restaurant.)

 

It seems that the file was corrupt, and there is no checking in the file.

It came out with a big stripe across it. Because of the compression,

one byte wrong messes up much of the rest of the image.

 

Many file formats have a CRC check, to allow recognizing corruption,

but it seems not. (Or else they just don't check it.)

 

After someone commented that my images were so big, I now

use the ImageMagick convert program, which seems to be standard

on some Linux systems, to resize (resample) the image.

 

There is also an identify program, which is said to identify corruption.

I don't know how it does that, or how well it works, but it can be done

command line in a large batch.

-- glen

Link to comment
Share on other sites

I've never used IrfanView and I can't comment on this as a solution. Just googling, there seem to be a couple of other tools that might be helpful, thoough some of these focus on JPEG files.

 

Some links you might want to check aout are:

- Bad Peggy software at Coder's Lagoon. Bad Peggy is mentioned in multiple forums on finding corrupted images

- Corrupt Image Check (CIC) developed by Barkersoftware and available from the Microsoft Store

- Exiftool, which - amongst its many other features - "Extracts thumbnail images, preview images, and large JPEG images from RAW files"

 

There's also the standard W10 Chkdsk function which scans a storage volume for possible errors.

Link to comment
Share on other sites

  • 8 months later...

I'm skeptical about 'repairing' a corrupt Jpeg too. 

I experimeted years ago, and just a one bit corruption was enough to scramble a Jpeg from the point on from the corrupted bit. (From this, it seems JPEGs are written and read sequentially, despite the compression. Maybe this offers the opportunity of bit-substitution trial-and-error correction until the least adjacent pixel variation is found.)

However, the degree of scramble varied with the software used to open the file. The freeware Irfanview showed the least scrambling. I'm not sure why.

Be that as it may. With the current low cost of memory cards and hard drives, there seems little reason, IMHO, not to take out the insurance of shooting and storing uncompressed RAW files. 

Edited by rodeo_joe1
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Some years ago, I was writing a JBIG2 compressor from the official documentation.

I wrote PDF files, and then read them with Firefox.

(JBIG2 is the favorite for compressing black and white, but not gray scale, images.)

 

One bit error, and what follows decodes to random bits. So, I could keep working

until the images came out right.  And as with JPEG, there is no error checking.

(Everyone else puts checksums in their files!)

-- glen

Link to comment
Share on other sites

On 12/11/2022 at 9:58 PM, EllinorWilliam said:

The best way to check for the issue in photos and fix them is CHKDSK & Run the System File Checker tool (SFC/SCAN). If you are running Windows, first run the inbox Deployment Image Servicing and Management (DISM) tool prior to running the System File Checker.

You can easily repair the corrupt images using a photo repair tool like Stellar Photo Repair. This will allow you to repair your photos in batches and take less time.

Neither System File Checker (SFC) nor DSIM will examine or fix USER files such as images. These tools are designed to find and fix/replace SYSTEM, i.e. Windows, files as the name SYSTEM File Checker implies.

 

Here is a link to a Microsoft forum discussing these tools.

 

SFC scannow - Microsoft Community

 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
On 3/25/2022 at 12:23 AM, henrymudd said:

How can I identify any corrupted images out of 365,000 before I archive them?

Identifying corrupted images can be a time-consuming task, especially when dealing with a large number of images like in your case. Tools like ImageVerifier or JPEGsnoop can scan your image collection and identify any corrupted files.

You can also use some recovery software like Stellar or Recoverit to fix such issues.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...