JPEG Repair Shop

JPEG Repair Shop allows you to repair corrupt JPEG files by manipulating the internal structure of the JPEG file. This makes it possible to repair corrupt files, which would be impossible to fix in a normal image editor.

How does it work
Download
Instructions
Troubleshooting
Contact

How does it work?

The image data of JPEG is divided into small rectangular areas called MCUs (Minimum Coded Unit) which are encoded together. Because of the way JPEG files are compressed an error in an MCU is likely to be propagated to the remaining image data, either displacing the image or changing the colors. JPEG Repair Shop allows you to delete and insert MCUs and to automatically fix color errors.

Watch a demonstration of the program on a corrupt JPEG image below:

For comparison you can download the original, the corrupted and the repaired image below:

Original Corrupt Repaired

If one looks at the repaired image by itself it is hard to notice that the image was ever corrupted, however when one switches between the original image and the repaired image quickly, some minor differences can be noticed. This is expected since image data was actually damaged.

Download

Disclaimer: JPEG Repair Shop is still in early development, and I do not take any responsibility for damages to your files. I recommend that you make a backup of your files before attempting to repair them with this application.

For the best results you should use the original files right after they were corrupted. Using other programs to manipulate the images or uploading them to social media might result in the data being recompressed, which can make it impossible for JPEG Repair Shop to repair them.

JPEG Repair Shop for Windows

To run the program unpack the archive and run JRS.exe. Versions for other platforms are planned for the future, but currently I only have a Windows machine available to build and test the application on.

Instructions

Select the folder that contains your images by clicking 'Select image directory...' and browse to the image you want to repair using the '<<' (previous image) and '>>' (next image) buttons.

Then you select the MCU you want to work at using the mouse. To the right you can see a preview of the MCU under the mousepointer and the selected MCU.

To repair the image you use the tools at the bottom right. 'Insert MCU' adds a blank MCU at the currently selected MCU, 'Remove MCU' removes the selected MCU, and 'Fix colors' tries to repair color errors starting at the selected MCU. To repair the colors you should select the first MCU that has color errors. 'Fix colors' works better when the line where the color errors begin is aligned with the line before, so if you need to add or delete MCUs you should do that before using the 'Fix color'-tool.

When you are done repairing your image, you press 'Save image...' to select a location to save your repaired image.

Step-by-step instructions on how to repair a corrupt JPEG file can be found here

Troubleshooting

The program crashes!
The colors are still noticeably different after using 'Fix colors'
I get an error: "Cannot load file. Corrupt header."
I get an error: "Cannot load file. No data in file."
I get an error: "Cannot load file. Unsupported marker: X"
I get an error: "Cannot load file. JPEG type not supported"

The program crashes!

If you can consistently reproduce the error, and you are willing to share the image that causes the crash, then please contact me, and I will try to fix the bug. Images shared with me will of course only be used for debugging and will be deleted afterwards.

The colors are still noticeably different after using 'Fix colors'

The program will analyse the image and try to guess the best colors. In most cases this works really well, but in some corner cases there will be a noticeably difference in the colors. I plan to add a manual control for adjusting the colors in a future release, but until then the only solution I can think of is to try to adjust the colors manually in a photo editor.

I get an error: "Cannot load file. Corrupt header."

Either the file is not an JPEG file or there is an error in the file header. Currently the program only repairs errors in the image data, but I expect to add support for corrupt headers in a future release.

I get an error: "Cannot load file. No data in file."

This is likely due to a failed file transfer. There is nothing I can do for you, there is no data contained in the file.

I get an error: "Cannot load file. Unsupported marker: X"

This is most likely because the program have encountered a restart marker. This means that the file have build in code, which helps the program recover from corrupt data, and currently the program does not have support for these files. I might add support for these in the future, but because corruption is less of an issue with these files it is not a priority.

I get an error: "Cannot load file. JPEG type not supported"

This means that the JPEG file uses progressive encoding (or another rare encoding format, but progressive is most likely). I do not plan to add support for progressive JPEG files. The reason for this is that while it would be rather simple to implement, it would incredible hard to use an require advanced knowledge of how data are stored in progressive JPEG files.

Contact

What color is a banana (anti-spam):

Name:

Mail:

Image file (Optional):

Message: