ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: snahl on May 11, 2013, 06:11:42 PM

Title: Is there a way to replace the existing preview image with another preview image?
Post by: snahl on May 11, 2013, 06:11:42 PM
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.
Title: Re: Is there a way to replace the existing preview image with another preview image?
Post by: Phil Harvey on May 12, 2013, 12:09:35 PM
Hi Hans,

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

But you may also be talking about JpgFromRaw or OtherImage.

- Phil
Title: Re: Is there a way to replace the existing preview image with another preview image?
Post by: snahl on May 12, 2013, 06:29:13 PM
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
Title: Re: Is there a way to replace the existing preview image with another preview image?
Post by: Phil Harvey on May 13, 2013, 07:11:06 AM
Hi Hans,

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

- Phil