File format error corrupt .dng

Started by johnpike, February 13, 2020, 12:19:08 AM

Previous topic - Next topic

johnpike

I have a corrupted .dng that came off of a deleted sd card. I'm trying to run ExifTool to at leas get at the preview. I tried Steller Photo repair and found the preview there but I'd rather not shell out the $30 for the software.

I keep getting a file format error.

Here is what I put in the terminal: exiftool -b -previewImage -w /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.DNG

I'm attaching the file (name is changed from the terminal but it's a copy of the same file.

Please help if you can!

johnpike

Sorry- I guess my file is to large to upload, glad to email it if someone can help.

Phil Harvey

The -w option requires an argument.  In this case you should use -w jpg to write an output file with a .jpg extension:

exiftool -b -previewImage -w jpg /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.DNG

If this works, there is also a chance there is a larger preview.  To see all available preview images, do this:

exiftool -a -s -preview:all /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.DNG

- 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 ($).

johnpike

I still get File Format Error:

exiftool -b -previewImage -w jpg /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.DNG
Error: File format error - /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.DNG
Error creating /Users/johnpike/Pictures/recover/Root/DCIM/100LEICA/X1000056.jpg
    1 files could not be read
    0 output files created


Phil Harvey

Ah, OK.  It doesn't look good then, but you could try my extract_preview script to do a brute-force extraction of embedded JPG images.

- 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 ($).