JpegDigger is back! Now as a powerful JPEG recovery tool …

By | July 12, 2019

Of course there is JPEG Recovery LAB. And yes, I stopped developing JpegDigger because the functionality to extract JPEGs from corrupted RAW photos was added to JPEG-Repair Toolkit. And still I felt the urge to make yet another JPEG carver that helps you recover photos that you deleted or lost from a memory card.

Corrupt photos aren’t always what it seems.

It’s funny how similar cases always come in waves. Past weeks I had a number of cases where all photos on a memory card were corrupt! And in all those cases it turned out the photos weren’t corrupt, but the file system! So rather than repairing the photos piece by piece, extracting them from the memory card while completely ignoring the corrupt file system made much more sense.

I or my client could of course JPEG Recovery LAB for that. But that felt a bit like using a cannon to kill a mosquito: JPEG Recovery LAB isn’t exactly light weight and it occupies all resources on a PC for hours. It is a heavy weight for those really difficult cases. Besides, JPEG Recovery LAB is mainly developed by some one else and I felt like writing my own light weight JPEG carver even though 100’s of photo recovery tools already exist.

I tried them and they didn’t work

To recover the photos from the memory cards that were sent to me I tried several tools. ReclaiMe for starters. Although this is my favorite goto data recovery tool it relies on file system structures to find lost data. And these couldn’t be trusted in these cases. It recovered the files, but they were all corrupt. Same  was true for the excellent myPhoto Recovery. It also takes the file system as a starting point (I confirmed that with the author). Anyway, I tried several and ended up using JPEG Recovery LAB.

How do you repair this JPEG?! You don't. You use JpegDigger

How do you repair this JPEG?! You don’t. You use JpegDigger

But as I watched it work, I thought to myself, there must be an easier, quicker way to do this.

I had to do it, try writing my own light weight photo recovery tool

I dug up an unfinished project that I worked on more than 10 years ago. The basic framework was there. It scanned a drive from start to end. I changed it to look for JPEG markers. I borrowed some code from JPEG-Repair Toolkit to process JPEGs it detected. I added stuff to make it scan faster, a certain degree of file system awareness.

I tested it against a batch of memory cards. Real cases sent to me by customers. I ran into some corrupt files that couldn’t be recovered intact (photo viewers and editors complained about unsupported formats and what not). I added some code to repair the photos on the fly to a point where they can be opened.

I ran into some fragmented photos and spend over a week to add code for basic, rules of thumb ‘bitfragment gap carving’. Nothing as advanced that JPEG Recovery LAB does, but again light weight and ‘on the fly’.

fragmented photo recovered without bitfragment gap carver enabled

fragmented photo recovered without bifragment gap carver enabled

Same photo with bifragment gap carver enabled

But with a plan ..

It may sound like I just programmed along. But believe it or not, I had a plan. As mentioned I wanted it to be light weight. The current executable file is less than 300 KB. A second thing I had in mind was that it needed to be easy on the memory card. Again using JPEG Recovery LAB as an example, it accesses the drive intensively. It scans, but later it goes back and forth to piece files back together for hours. To save the files, it needs to access the card again.

So, small, fast and the least possible amount of disk access. Initially it copied files to safety as it detected and processed them. It worked it’s way towards the end of the drive, scanning, repairing and copying files at the same time. To detect a file it needs to read the disk and save that data to memory. It processes the data in memory, so why not immediately save it to another disk?

I needed a name for the tool .. JpegDigger, why not?

JpegDigger, why not? It exactly describes the purpose of the tool. It is available and people already heard about it. I am not a marketing guy, so I don’t know it is wise, but I like it.

JpegDigger – light weight JPEG carver

I expect to release it somewhere in the next few weeks.

Leave a Reply

Your email address will not be published. Required fields are marked *