A few days ago I heard about PhotoRec. To see whether it might be helpful in future cases of data loss, I tried it on the SD card image (dd-format) of previous month.
PhotoRec could recover the JPGs and ORFs, however the JPGs recovered by PhotoRec are shorter than the originals (by about 1/2 MBytes). They can be displayed without errors, though.
What seems to happen is as follows:
Some cameras append a preview image (larger than the EXIF thumbnail) at the end of the JPG file (behind the EOI).
Some cameras use the multi picture file format for this, e.g. the Panasonic GH1. PhotoRec knows this file format and recovers such JPGs as .mpo including the preview image.
Some other cameras, e.g. Olympus OM-D E-M1, use a non-standard way and record the presence and position of the preview image only in the maker notes (within the EXIF header). PhotoRec doesn't seem to know about this and thus truncates the JPG file after the first EOI, cutting off the preview image.
It's debatable whether this truncation is harmful (probably only Olympus cameras can make use of the preview image anyway). But if you would like to amend PhotoRec such that it can handle these JPGs correctly:
- I could provide you with some sample JPGs, if you tell me how I can transfer a few files of 5 MB+ to you.
- Exiftool can extract PreviewImageStart and PreviewImageLength, so it might be helpful to have a look at Exiftool and how it finds out these values.
I don't know whether other cameras (Canon, Nikon, Pentax, Sony, ...) also append preview images and, if so, how they make its presence known.
Cheers
Rf Mw