6

I wonder if there is any way to restore corrupted JPEG files in my situation. Duting copying of files from camera SDD card I had some kind of problem/mistake with few files, but I was able to repeat copying and didn/t check the files after that. It appeared that these files became corrupted and I can't open them or restore, I've tried multiple JPEG recovery software. Unfortanutely, SDD card was used a lot since that moment and recovery from it is also not a option. In JPEG Snoop I can find small format images in my files but they do not orrespond to the actual lost picture. I'm attaching example corrupted and normal photo taken the same time. Hope for your help, thanks!

https://drive.google.com/drive/folders/1TXLpc4kseFz9gjDCENREhsbH1HL-J4Dh?usp=sharing

0
8

File contains JPEG data, so then it's always possible to glue on the header of a known good file that was shot with same device with settings matching as closely as possible (quality, resolution). If I do that I get this:

https://drive.google.com/file/d/1vWd0oXmqlcMOQ2CFmA9FQ2hZ0Cq0UHdd/view?usp=sharing

Note that the photo in above URL is edited because after 'gluing' on header photo looked 'washed' so I enhanced using Paint.NET.

So definitely not random junk. I only lost bottom 5% or so of the 6000x4000 JPEG. You can tell 'random junk' from JPEG data by looking at entropy and absence of certain byte combinations using a hex editor like HxD.

JPEG data is high entropy, compressed data, somewhere between 7.8 - 7.98 bits/byte. But ZIP files are high entropy too. So how to tell the difference? You can do this by using a hex editor like HxD: JPEG image data generally (unless the file contains restart markers) does not contain FF xx byte combinations unless xx = 00. So FF 00 is accepted by JPEG, FF A7 is not. FF 00 is decoded, FF A7 interpreted as a marker. Most decoders (image viewers) will either report invalid marker or simply stop decoding resulting in a partially grey image.

Indeed there's a smaller embedded JPEG inside. Also file starts with header-less JPEG data, then towards end of the file there's a header of another JPEG + 5% of image data. I used that header to decode the header-less image data at the start of the file.

lower resolution embedded preview 1620x1080

I also created a video now that shows how I repaired this photo: https://youtu.be/nMpdPEKIPLU

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.