JPGRepair – Fix and Repair corrupt JPEG headers and invalid markers

JPEG Repair Software – JPEG Repair Tool – Fix and Repair corrupt JPEG headers yourself

Fix and Repair corrupt and damaged JPEG headers using JPGRepair. JPGRepair can repair corrupt JPEG headers using a reference or sample file. It is an easy alternative for replacing a corrupt header with an intact one using a hex editor.

It can also repair Invalid JPEG Markers. For the latter it doesn’t use the reference file. A typical symptom of a corrupt header is that the JPEG file can’t be opened at all. Windows explorer does not show preview thumbnails and different viewers and photo editors may show different error messages.

Features:

  • Repair corrupt and damaged JPEG files
  • Fix corrupt JPEG header
  • Repair Invalid JPEG markers
  • Attempts to repair damage due to bad sectors
  • Backup option (although I urge you to work on copies rather than originals)
  • Preview of repaired file
  • Free version that really saves files (batch mode disabled)!
Fix and Repair corrupt JPEG headers with JPGRepair with the use of a reference or sample file.

Fix and Repair corrupt JPEG headers with JPGRepair with the use of a reference or sample file.

The freeware version of this jpeg repair software is functional except for the batch mode being disabled.

This download is free of adware and other crapware!

Reference File

The reference or sample file should be taken with the same camera as the corrupt image(s). Also, the settings (resolution, quality and orientation) of the sample file need to match the corrupt files. If unknown then you would need to experiment by taking different shots with different settings using the original camera (same brand and type).

Windows photo viewer doesn’t like this file! The result of a corrupt JPEG header.

Fix and Repair corrupt JPEG headers

I suggest, I urge you work on copies of the corrupt files!

Preparation

1. Copy corrupt files to a folder on your hard disk
2. Also copy the sample/reference file to the same folder and name it ‘sample.jpg’.
3. Run JPGRepair (just the jpgrepair.exe, no setup required).

Corrupt files and the sample are copied into one folder.

Corrupt files and the sample are copied into one folder.

Using JPGRepair

1. Browse to your folder containing the corrupt jpegs + sample file.
2. Select the corrupt files. The free version allows for one file to be processed at the time.
3. Click Repair.

Fix and Repair corrupt JPEG headers in 3 steps

Fix and Repair corrupt JPEG headers in 3 steps

JPGRepair will now attempt to repair selected JPEGs using the sample file. If successful it will automatically save the repaired files.

JPGRepair shows previews of repaired JPEGs

JPGRepair shows previews of repaired JPEGs

JPGRepair shows previews of the reconstructed files. Additional details such as the preview, height, width and bit depth are taken from the raw image data. Check the folder for the repaired files.

Fix and Repair corrupt JPEG headers, done!

It’s easy enough but this video shows the process as well:

Skip bytes after bad header explained:

Skip bytes after bad marker. Often an invalid jpeg marker is 'embedded' inside a a series of corrupt bytes. This option allows to jump over corrupt bytes.

Skip bytes after bad marker. Often an invalid jpeg marker is ’embedded’ inside a a series of corrupt bytes. This option allows to jump over corrupt bytes.

Skip bytes after bad marker requires some trial and error to get to a picture that can be further improved using photo editing software. A video might illustrate that better than written text.

We did Raymond.cc’s challenge: repair-and-fix-corrupted-images

Raymond.cc’s challenge: repair-and-fix-corrupted-images. We win!

JPGRepair against the competition using the Raymond.cc test method and images! Click image to read the blog-post. For one, this test shows how hard automatic JPEG repair actually is.

It doesn’t work!

* Files remain corrupt (can not be opened)

Then JPGRepair was unable to find actual image data within the corrupt files. A very common cause for this to happen is that although the file has a > 0KB file size and a JPG extension, it is actually empty.

To check: Use a hex editor such as HxD to open the file. Commonly, empty files contain only zeros or a FF FF FF byte pattern. Such files can not be repaired at all.

Check corrupt JPEG files using HxD. This corrupt JPEG is beyond repair.

Check corrupt JPEG files using HxD. This corrupt JPEG is beyond repair.

It is also possible the damage corrupted the header + part of the image data (like part of file was overwritten). As such it is impossible for JPGRepair where the actual image data starts (SOS marker) and it can not merge an intact header with the image data.

* Files look totally weird or psychedelic now

Possibly your are not using the correct header (wrong resolution for example)

Wrong JPEG header chosen for this file ..

Wrong JPEG header chosen for this file ..

* File properties are lost

Part of the header of a JPEG may include info about the photo, like camera model, settings, flash fires yes/no etc.. JPGRepair strips non essential parts from the header of the sample file and therefor such info may indeed be lost.

Certain details that were present (properties of photo, camera make and model etc. will be lost in repaired JPEGs.

Certain information that was present (properties of photo, camera make and model, thumbnail, preview etc. will be lost in repaired JPEGs. This does not affect the quality of the image though.

I get a SmartScreen warning when running JPGRepair

See this when running JPGRepair? It means I have recently updated the software and SmartScreen doesn’t recognize it yet. Click More info > Run anyway.

Support

If you have other issues then feel free to contact me. Sent me your sample file + some corrupt files so I can examine them.

Leave a Reply

Your email address will not be published. Required fields are marked *