Jump to content

Dng export jpg


equifoto

Recommended Posts

It's been a while since I've been monitoring these forums, and since I had to hack exiftool commands...

 

My initial goal was to extract full res jpegs from NEF files. Unfortunately, those NEF files (from a scanner) do not contain full res jpegs, so I first converted the NEF files to DNG using Adobe's latest DNG converter.

 

The DNG files still have all the original metadata, plus stuff Adobe added, which happens to be useful. Because I specified that I wanted full res jpeg preview when I ran the DNG converter, that's what I got. (One reason this is a good way to do it is because the Adobe prog takes into account the NEF color settings significantly better than other programs I have tried.)

 

Now, I have reduced the problem to extracting full res jpeg from DNG. What I have figured out so far is that I can do the following:

 

exiftool -b -JpgFromRaw -w jpg -ext dng .

(note the dot -- I am just working in the current dir)

 

However, doing this for a single file with

 

exiftool -b -JpgFromRaw anyfile.dng>full_preview.jpg

 

does not transfer any metadata from the DNG to the jpeg.

 

So, I also have figured out I can do:

 

exiftool -tagsfromfile %d%f.dng -ext jpg .

 

to copy the metadata from the DNG to the jpeg, which seems to work just fine.

 

My question: how do I combine those two operations into a single exiftool command, preferably without leaving any intermediate files behind?

 

Thanks.

 

--peter

 

Oh, this is using exiftool 8.87 under win xp.

Logged

Phil Harvey

ExifTool Author

Administrator

ExifTool Freak

 

 

Posts: 7030

 

 

Re: extract jpeg from raw (dng) including all metadata

« Reply #1 on: May 01, 2013, 06:12:02 PM »

You can't extract an embedded image and copy metadata to it in one step. You must use 2 commands. However, you can combine 2 commands into a single command line using the -execute option.

 

- Phil

Logged

pb

Sr. Member

 

Posts: 127

 

Re: extract jpeg from raw (dng) including all metadata

« Reply #2 on: May 05, 2013, 07:36:39 PM »

Thanks!

 

Is there any performance advantage to using the execute command?

 

Never mind; I found this:

 

"Also, the -execute option may be used to perform multiple independent operations with a single invocation of exiftool, and together with the -stay_open option provides a method for calling applications to avoid this startup overhead."

 

Actually, now I have found on the man page the following, which I would like to believe was added only after I asked my original question, but I suspect was there all along:

 

"exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute -if '$previewimage' -b -previewimage -w %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original -common_args --ext jpg DIR

 

[Advanced] Extract JpgFromRaw or PreviewImage from all but JPG files in DIR, saving them with file names like image_EXT.jpg, then add all meta information from the original files to the extracted images. Here, the command line is broken into three sections (separated by -execute options), and each is executed as if it were a separate command. The -common_args option causes the --ext jpg DIR arguments to be applied to all three commands, and the -srcfile option allows the extracted JPG image to be the source file for the third command (whereas the RAW files are the source files for the other two commands).'

« Last Edit: May 05, 2013, 07:53:39 PM by pb »

Logged

Phil Harvey

ExifTool Author

Administrator

ExifTool Freak

 

 

Posts: 7030

 

 

Re: extract jpeg from raw (dng) including all metadata

« Reply #3 on: May 06, 2013, 07:59:43 AM »

Glad you found that. No, it wasn't added recently.

 

- Phil

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...