JPEG Repair Service

If an image is worth a thousand words, what will you do when you are left speechless?

Our JPEG Repair Service can often restore corrupt JPG files to their former glory.

JPEG is a widely used format for storing digital photos. Also because most consumer grade digital camera’s and smart phones store digital images using the JPEG format (.jpg files).

Corruption of a single bit can already severely impact a JPEG file. The Following JPEG image was affected by a single bad sector:

JPEG repair bad sector damage

Damage due to bad sector – 512 damaged bytes

This page shows we are able to manually repair images like this. We use software that we develop in-house. JPEG image repair is a labor intensive process which requires “fingerspitzengefühl” as the Germans call it. Therefor it is also very difficult to automate this procedure.

Automatic JPEG Repair Software

All automatic JPEG Repair Software we that we know of is unable to repair this image. The actual image data inside a JPEG file is compressed using a Huffman compression algorithm. As a result it is just a big blob of zeros and ones. Until now it is impossible to make software determine if one or more bits are ‘flipped’, or missing, or excess.

However, since the software we tested does not alter the original JPEG image, there is no harm in trying such software.

Repair Procedure

For the image repair process we use tools that we develop in-house. This includes utilities for checking the image file for structural damage, patching binary data and post processing.

Verifying the JPEG structures

We start by visually inspecting the image and analyze it using our proprietary ChkJpeg utility. Much like Chkdsk does for your hard disk, ChkJpeg checks if internal structures are okay. If Internal JPEG structures are corrupt we need a known to be good sample JPEG file that was taken with the same device that was used to create the corrupt image.

Due to the fact devices may use different compression settings for the different settings chosen to create the photo, this sample needs to taken using the exact same settings (dimensions, quality settings etc.).

Patching the JPEG compressed data

If the structures are okay we ‘patch’ the image data. This is a manual process that involves lots of trial and error. Because of that it is hard to automate this process.

Depending on the type of corruption we observe, we add, remove, or modify binary data from the image data stream.

Post Processing

As patching often introduces unwanted effects such as colorless blocks we post process the image using a technique called inpainting.