ExifTool Forum

ExifTool => Newbies => Topic started by: PedroMN on September 28, 2023, 05:29:31 AM

Title: Output is .dat
Post by: PedroMN on September 28, 2023, 05:29:31 AM
Hi, I am trying to recover an image with the following command:

exiftool -a -b -W %d%f_%t%-c.%s -preview:all P1280142.JPG

But the output returns me the correct thumbnail but the image is a .dat, I have tried changing the extension, converters and I can't get the correct image.
Any help would be appreciated. Thank you very much
Title: Re: Output is .dat
Post by: StarGeek on September 28, 2023, 12:23:32 PM
The data in the PreviewImage tag is obviously not an actual jpeg, as would be normal for most cameras.  There really isn't much you can do unless someone can figure out what the data actually is.
Title: Re: Output is .dat
Post by: PedroMN on September 29, 2023, 03:14:05 AM
I have 3 other images that are damaged like the one in the post and I applied the command and was able to get correct images using the PreviewImage tag.
But with this one I have not been able to, and other paid software can fix it.
Could you recommend me something to see if I can recover it?
Title: Re: Output is .dat
Post by: Phil Harvey on October 06, 2023, 08:05:33 AM
This file has been modified by some other software, and the preview image has been lost.  The preview image pointer now points to an arbitrary location in the main JPG image data, and the resulting .dat file extracted by ExifTool is garbage.

- Phil

Edit:  ExifTool shows this warning if you try to extract the preview without the -W option:

> exiftool P1280142.JPG -previewimage
Warning: [minor] PreviewImage is not a valid JPEG image - P1280142.JPG