Copying makernotes - again

Started by herb, November 16, 2012, 06:28:20 AM

Previous topic - Next topic

herb

Hello Phil,

In topic https://exiftool.org/forum/index.php/topic,4339.0.html
I have learned that makernotes depend on the makernotes itself and also on EXIF tags make and model.
At that time I was working with *.MIE files to be created by ExifTool.

With my Olympus camera I created pictures stored both as *.jpg and also as *.orf.
Now I tried to copy the makernotes of file "image.orf" into file "image.jpg" with
     exiftool -tagsfromfile image.orf -olympus image.jpg
and I expected that the copy will work, because both imagefiles have identical EXIF tags make and model.

     exiftool -tagsfromfile image.orf -olympus -make -model image.jpg
is working properly.

Would it be possible that also the first command is working in case of identical tags make and model.
Or are there any points that do not allow this.

Thanks for your comments in advance
Best regards
Herb

Phil Harvey

Hi Herb,

Neither command should work because the "Olympus" tag is used in MIE files only.  For EXIF maker notes you should specify -makernotes instead.

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

herb

Hello Phil,

thanks for your quick reply.
But - sorry - I do not understand it.

In case of a display command
- with -g0 option the makernotes are displayed with headline "Makernotes"
- with -g1 option they are displayed with headline "Olympus" (in case of an Olympus *.orf) file.

So I do not see any difference - in case of an Olympus *.orf file - between the following commands
     exiftool -tagsfromfile image.orf -olympus    -make -model image.jpg
     exiftool -tagsfromfile image.orf -makernotes -make -model image.jpg


For both commands I get the reply: 1 file updated.

Thanks in advance again and
best regards
Herb



Phil Harvey

Hi Herb,

I'll try to explain:

The -g0 and -g1 options show the group names, but it is a tag name that you specify on the command line.  (OK, well, you could specify -olympus:all, but that could attempt to copy the makernotes tags individually, which won't work because you can't create individual makernotes tags.)  The maker notes must be copied as a block by specifying the tag name of the makernotes block.  See the EXIF tag name documenation for a list of these names.  For Olympus, the maker notes may be called either MakerNoteOlympus or MakerNoteOlympus2, depending on the camera model.  To make things simpler, ExifTool has a MakerNotes Shortcut tag which covers all of the different possible maker notes tag names.

Both of your commands give the same message because both copy the Make and Model tags, but only the 2nd command copies the maker notes.  If you start with a JPEG which doesn't contain the maker notes, you should be able to see this by taking a look at the Makernotes information in the resulting file.

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

herb

Hallo Phil,

thanks for being so patient and thanks for your detailed explanations.
It really helped me to get a proper understanding how to work with makernotes.
Thanks again.

But please allow that I come back to the main goal of this topic.
With the command (from a technical point of view only)
exiftool -tagsfromfile canon.mie -makernotes -make -model olympus.jpg
it is possible to copy (backup) canon-makernotes into an olympus image. 

My question is now:
How to avoid this within the copy-command.
How can be checked (within the copy-command)
exiftool -tagsfromfile image.mie -makernotes image.jpg
that the *.mie file and the *.jpg file both have identical tags make and model.

Thanks for your help in advance
Best reagrds
Herb

Phil Harvey

Hi Herb,

You can test tags in the destination image with a -if condition, but you can't do this for the -tagsFromFile file, so there isn't an easy way to compare tags from these two files.

I can tell you that the Canon makernotes won't be copied unless the destination image is Canon (or you set Make to Canon at the same time), but this isn't true for all maker notes -- it depends on whether or not ExifTool needs the Make information to determine the MakerNote structure.

So I don't think I can be much help with this problem.

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

herb

Hallo Phil,

thanks again for your quick reply.

For me the summary  of your last post is:
Even a command like
exiftool -tagsfromfile image_1.mie -makernotes -make -model  image_2.jpg
does not guarantee that Makernotes will be copied in every case.

Thanks again for your very detailed answers and hints.
Best regards
Herb

Phil Harvey

Quote from: herb on November 17, 2012, 09:11:51 AM
For me the summary  of your last post is:
Even a command like
exiftool -tagsfromfile image_1.mie -makernotes -make -model  image_2.jpg
does not guarantee that Makernotes will be copied in every case.

That's not what I was trying to say.  The above command should always work, provided Make, Model and MakerNotes exist in the source image.  But this will overwrite the Make, Model and Makernotes of the destination image, no mater what they are. 

It sounded to me as if you were asking for a way to avoid doing this if the Make was different in the destination.  And I can't think of an easy way to do this.

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