JPGRepair
=========

JPGRepair can repair corrupt JPEG headers using a reference or sample file. 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.

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).

How to use JPGRepair
====================

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

1. Copy corrupt files to a folder on your hard disk
2. Copy sample file to the same folder and name it 'sample.jpg'.
3. Run JPGRepair (just the jpgrepair.exe, no setup required).
4. Browse to your folder containing the corrupt jpegs + sample file.
5. Select the corrupt files. The free version allows for one file to be processed at the time.
6. Click Repair.

Free vs. full version
=====================

Free version processes one file at the time (one file can be selected each time) but is fully functional for the rest. The full version allows batch processing.

If JPGRepair manages to help you then I hope you will reward my efforts by purchasing a license.

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.

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

* Files look totally weird and psychedelic now

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

* Files can be opened, image data visible but misalligned and colors off

Probably the actual jpeg image bit stream is corrupt and the jpeg does not contain restart markers. I offer a service to correct this type of errors. If you have purchased JPGRepair I will repair two images for free.

But stream corruption can also occur when the jpeg does include jpeg markers but it will often be limited. Minor corruption can often be fixed using the clone stamp tool in Paint.NET.

How does JPGRepair work?
========================

JPGRepair takes the header of a known good file and processes it. Basically it strips out components that were specific to the sample file.

it then scans the corrupt file for a 'start of scan' marker. It examines the compressed image data and strips it from invalid markers. Then the processed image data is merged with the processed header.

Contact / Support
=================

On my website (www.disktuna.com) you will find a contact form. You are also welcome to drop me an email - joep@disktuna.com.

If relevant include a few corrupt files + a known good sample.

