Fixing a damaged RAW file (when the EXIF data seems intact)

Started by pacman, February 20, 2016, 04:37:17 PM

Previous topic - Next topic

pacman

Lightroom reports that a certain Canon RAW file (.CR2) says it can't be recognized and if I open it in the Mac OSX "Preview" application the image is all black.

So I read about Exiftool's ability to recover damaged RAW files. First I tried the following command to see if some useful info could be extracted from the image:

$ exiftool filename.CR2
... or better yet, redirecting that output to a text file:
$ exiftool filename.CR2 > fileinfo.txt

Everything appeared to be fine there, despite the entire image being all black, so I proceeded to the next suggestion which I picked up in a thread telling how to extract a JPG out of the RAW file:

$ exiftool -b filename.CR2 > filename_extracted.JPG

But the file was unreadable and very small (388 KB) compared to the RAW file (7.9 MB).
Is there anything else I can try?

Phil Harvey

You must specify one of images to be extracted.  Something like

exiftool -b -previewimage filename.CR2 > filename_extracted.JPG

exiftool -b -jpgfromraw filename.CR2 > filename_extracted.JPG

Use the command to see what images are avaiable:

exiftool -preview:all filename.CR2

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

pacman

Thanks Phil!
While extracting the JPG itself didn't work I did manage to get the preview, so I'm taking note of this feature for later. Thanks again!