ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: johnpike on February 13, 2020, 12:19:08 AM

Title: File format error corrupt .dng
Post by: johnpike on February 13, 2020, 12:19:08 AM
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!
Title: Re: File format error corrupt .dng
Post by: johnpike on February 13, 2020, 12:27:02 AM
Sorry- I guess my file is to large to upload, glad to email it if someone can help.
Title: Re: File format error corrupt .dng
Post by: Phil Harvey on February 13, 2020, 07:07:57 AM
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
Title: Re: File format error corrupt .dng
Post by: johnpike on February 13, 2020, 09:45:53 AM
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

Title: Re: File format error corrupt .dng
Post by: Phil Harvey on February 13, 2020, 09:48:58 AM
Ah, OK.  It doesn't look good then, but you could try my extract_preview script (https://exiftool.org/forum/index.php/topic,4172.msg19805.html#msg19805) to do a brute-force extraction of embedded JPG images.

- Phil