Our JPEG Repair Service can often repair and restore corrupt JPEG files to their former glory.
JPEG is a format for storing digital photos that is widely used. Most consumer grade digital camera’s and smart phones store digital images using the JPEG format (.jpg files). JPEG files can ‘go bad’ due to a wide variety of reasons. Due to the nature of the JPEG format even damage of a few bits the image can become corrupt.
- JPEG Repair vs. JPEG Recovery
- Example 1 of what type of damage we can fix
- Example 2 of corrupt JPEG Repair
- Example 3
- Photo Recovery and intact previews but corrupt digital photos explained.
- Examine JPEGs using a hex editor before ordering JPEG Repair
- New! JpegDigger. Extract JPG files from corrupt RAW files (freeware).
Corruption falls in two categories (or both):
- Corruption of meta data.
- Damage in the compressed image stream.
Of course often corruption is a result of a combination of the two.
Corruption of meta data
A JPEG file consists of a chain of so called markers. One marker basically points to the next. Each marker serves it’s own purpose. A marker can for example contain Huffman tables (needed to decompress the image stream), a comment, or the compressed image stream itself. If all is well the JPEG decoder starts at the START OF IMAGE (FF D8) marker and makes it all the way to the END OF IMAGE (FF D9) marker.
The image stream makes up the bulk of the Jpeg image. As image viewers that support JPEG typically jump from marker to marker and interpret each of those, corrupt markers often prevent the image from loading.
Typical symptoms include:
- Unknown file type
- Unknown Format
- Invalid JPEG file structure
- Corrupt image header
- Invalid JPEG marker
- Unknown JPEG marker
Damage within the compressed image stream
The actual image data is compressed. 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 Service – 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 corrupt JPEG structures
We start by visually inspecting the corrupt JPEG 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.
Depending on the type of corruption we observe, we add, remove, or modify binary data from the image data stream. 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.
As patching often introduces unwanted effects such as colorless blocks we post process the image using a technique called inpainting.
This short video demonstrates the different stages of fixing a severely damaged JPEG file.