Add Additional JPG Preview to an Image

Started by DS256, October 26, 2021, 10:59:33 AM

Previous topic - Next topic

DS256

I'm working on a project discussing what is a photograph versus digital art (please no flames and arrows). As part of this I would like to propose a method to compare to an edited image with it's photograph. What I would like to do is pull one of the previews from the the original RAW file and add it to the export file from a post processing program (e.g. Lightroom).

I know how to pull previews from a RAW file using EXIFTOOL but not sure if there is a metadata construct and/or EXIFTOOL to add an additional embedded preview to an file.

Thanks for any insights.

Phil Harvey

What format file are you adding it to?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DS256

Whichever is easiest for a proof-of-concept; TIFF?

Phil Harvey

JPEG is easiest for proof-of-concept:

Just write the preview as a trailer:

exiftool a.jpg "-trailer<=b.jpg"

Then to extract:

exiftool a.jpg -trailer -b > c.jpg

You can store any arbitrary file as a JPEG trailer.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DS256