We won’t get into details. Let’s just say that somehow a memory stick in our camera got reformatted.
All the pictures are gone, right? Fortunately the answer is no. Most format processes only put a new filesystem on the memory card. The data for the photos is still there, there’s just no longer any information on where they are.
Fortunately image files are in standard, recognizable formats, so it is possible for a specialized program to search the raw data on the memory card and reconstruct most, if not all of the image files. The image files can then be copied onto your computer as good as new.
Things aren’t completely foolproof though. First and most important is to stop using the memory card immediately as soon as you realize you have mistakenly formatted the card or erased an important image. Since there is no longer any information on where the old pictures are stored, any new pictures taken will overwrite the old, deleted pictures. To be safe, take the memory card out of the camera, switch it to “read-only” if possible, then keep it in a safe place until you can use recovery software on it. If you have kept using the memory card, it’s still worth trying a recovery. You probably would get back less than if you stopped using it immediately though.
Second, in most cases you cannot get back the original filenames or creation dates if the card is formatted. (If on the other hand the file was deleted instead of formatted then you may be able to reconstruct the file names and creation dates too.) However image files usually have some embedded metadata in EXIF format in the file which contains further detail on the images. In my case I am able to see the date information, but the filename information is not there. So at least I will be able to name the files in order by the time the picture was taken.
Third, depending on how fragmented your memory card is, the recovery program may not be able to piece things together exactly, so it is possible you will not be able to get back 100% of your images automatically. Different software will have different results in how accurately they can reconstruct the files.
I tried a few different programs and found I had the most success with PhotoRescue. PhotoRescue comes in three different versions depending on if you need it to run completely automated, or whether you are more of an expert in reconstructing images. The automated method will usually work pretty well but it is not 100%.
I used PhotoRescue Advanced, which is their most sophisticated version, however it is also much more challenging to use. With this version you can get a few percent closer to 100% recovery of your images. When I tried a competing product, it found 530 images on my memory card. However after I looked closer I found that close to a hundred were recovered corrupt, truncated, or otherwise unusable.
In comparison, PhotoRescue Advanced found a more modest 482 images, however all but 8 of those were undamaged. If using an automated reconstruction, this is the extent of how much you could recover. However, using the advanced features of PhotoRescue Advanced, I was able to completely reconstruct all but one of the damaged images manually.
The next problem was that it recovered not only the images that were on the card when it was last formatted but also older images that I had already copied off onto the computer. I was able to use the thumbnails and EXIF date information to sort out the files I already had. At the end of it all I had 411 image files that otherwise would have been gone forever. This all had to be done manually though.
The remaining problem is that the files were recovered in the order they were found which is not exactly the same order as they were taken. As I mentioned previously, this information is stored in the EXIF data, however for 411 images it’s a bit too much to sort through by hand. Instead I will be writing a perl program to read in the EXIF data and sort the files by date and restore the file timestamps as well.
For now though, I at least have the satisfaction of having the 411 pictures back and safe.
UPDATE: Windows XP’s explorer has a column for ‘Date Picture Taken’ which can be added to the view when using ‘details’ view. This can help you sort if you want to do it manually.
UPDATE2: I wrote a quick script to sort and rename from EXIF date. PS: For those of you who don’t watch Law & Order SVU, this also means your naughty pictures are still there after being deleted or formatted.