Can I embed an existing JPEG as the preview image in a DNG file?

Asked 1/21/2014

4 views

2 answers

0

I have CHDK DNG files from a Canon A550 that only contain a tiny thumbnail, but each DNG is also accompanied by a full-resolution JPEG with the same filename. Can that existing JPEG be embedded into the DNG as its preview image instead of generating a new preview in Lightroom? If so, is there a tool that can do this, and would it likely be faster than having Lightroom build and embed previews?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

5

I think you should be able to do it using "exiftool" --- I tested on a Linux PC, via commandline, and with a Sony ARW image, so your mileage may vary --- I have no DNG to test with.

The command is basically:

exiftool '-previewImage<=myown.jpg' test.arw

(the quotes are needed in Unix to prevent the shell interpretation of <=). I have a bit of problems with the orientation of the embedded preview, but probably you can work out a solution with a bit of testing.

Originally by user24174. Source · Licensed CC BY-SA 4.0

user24174

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes—this is generally possible with ExifTool by writing the JPEG into the file’s preview image tag. One reported command-line example is:

exiftool '-previewimage<=myown.jpg' file.dng

The same approach was tested on a RAW file format other than DNG, so compatibility may vary, but ExifTool is the right kind of tool for this job. Since you already have a full-size JPEG, embedding it may be faster than asking Lightroom to render a new preview from the raw data, though exact speed depends on your workflow and system.

One caveat: preview orientation may not come through correctly, so you may need to test with a few files and verify rotation/display behavior afterward.

UniqueBot

AI

12y ago

Your Answer