How to embed the original date into the image created by exiftool

Started by Thiru, January 29, 2023, 04:07:59 AM

Previous topic - Next topic

Thiru

Hi,
I am very new to this excellent tool. Thank you for creating this tool.
Wondering how
(1)to embed the original date of the photo (nef raw format) to the jpg created with exiftool
(2)to maintain the same dpi

StarGeek

Quote from: Thiru on January 29, 2023, 04:07:59 AM(1)to embed the original date of the photo (nef raw format) to the jpg created with exiftool

Assuming the jpegs are in the same directory as the nefs
exiftool -ext nef -TagsFromFile %d%f.jpg -AllDates /path/to/files/

Quote(2)to maintain the same dpi

That can depend upon the source of the dpi in the original file.  Use the command in FAQ #3 and look for any resolution data.  In my NEFs, there are a couple of spots, but some wouldn't apply to the main image, just the preview image.  You might try adding -EXIF:*Resolution* after -AllDates in the above command.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Thiru

#2
Thank you for your suggestions StarGeek.
Version of Exiftool is 12.55 on Windows10

This is the command I used to extract the jpg from my Nikon nef file

exiftool -config example.config -bigimage -b --ext jpg -w _preview.jpg DIR

(which I found at Extract largest embedded jpgs from cr2/nef/dng in one line (exiftool.org) - https://exiftool.org/forum/index.php?topic=10415.0)

Quote from: StarGeek on January 29, 2023, 12:45:58 PM
Quote from: Thiru on January 29, 2023, 04:07:59 AM(1)to embed the original date of the photo (nef raw format) to the jpg created with exiftool

Assuming the jpegs are in the same directory as the nefs
exiftool -ext nef -TagsFromFile %d%f.jpg -AllDates /path/to/files/

Quote(2)to maintain the same dpi

That can depend upon the source of the dpi in the original file.  Use the command in FAQ #3 and look for any resolution data.  In my NEFs, there are a couple of spots, but some wouldn't apply to the main image, just the preview image.  You might try adding -EXIF:*Resolution* after -AllDates in the above command.