Is there a way to replace the existing preview image with another preview image?

Started by snahl, May 11, 2013, 06:11:42 PM

Previous topic - Next topic

snahl

Hello again,
What a question! Well there are very rare cases when a positive answer to this might resolve an issue. Here is one very rare such case, let me explain.

I shoot time lapse sequences in RAW (Nikon NEF). It is known that Nikons Transfer software sucks, it may randomly leave out some images to be transferred. When that happened for a time lapse sequence then it's too late to not use Nikons transfer utility anymore. But too late, the error happened long ago and the TL-sequence is only now being processed, there is no way to get hold of the original content on the CF-card - tough luck.

Still, why replace an existing preview image with another one?
The images left out during the copy process can be replaced by fake doubles no sweat and with Exiftool relevant metadata can be manipulated as needed. so far so good.
But this case is an HDR-Time Lapse sequence and I am missing a few bracketed shots (actually only 4 of them).
So to minimize interruption in the flow of images I intend to use directly adjacent images as fake doubles but of course their preview image is brighter or darker by whatever bracketing increment was chosen (in this case 1EV).
The reason I want to replace the preview image is simply because the software processing this time lapse sequence relies on the previews to calculate the flicker effect and minimize it as such.

I have read the article 'The Preview Image Problem' (http://www.exiftool.org/writing.html) but honestly I don't quite get it.
So the questions remains and if the answer is a 'Yes' I would like to know the syntax to insert (replace) an extracted preview image.
(I am afraid the answer will be a 'No go'.

Greetings, Hans.
Dig-IT-all

Phil Harvey

Hi Hans,

In general, the syntax is:  exiftool "-previewimage<=preview.jpg" some.nef

But you may also be talking about JpgFromRaw or OtherImage.

- 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 ($).

snahl

Alright, let me clarify:

I intend to copy the preview image from one RAW image to another RAW image (both Nikon NEF).

For example: copy preview image data from IMG_0011.NEF into IMG_0012.NEF

So I guess I am talking about JpgFromRaw.

(the images are adjacent or max 2 images apart, but I would think that this fact does (should) not make a difference).

- Hans
Dig-IT-all

Phil Harvey

Hi Hans,

OK, then try this:  exiftool -tagsfromfile source.nef -jpgfromraw destination.nef

- 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 ($).