Main Menu

Usage question

Started by MikeFromMesa2, March 10, 2018, 07:32:14 PM

Previous topic - Next topic

MikeFromMesa2

I have been trying to use ExifTool to add exif tag information to images I take with a manual lens. Because the lens is completely manual there is no lens related information in the images, or the information is blank or contains useless data like "none".

My thought was that I would write a GUI wrapper around ExifTool to make selecting and modifying multiple files easier, and the work has been interesting. I thought I had it all working when I realized that some calls were failing and, when I tried to figure out why, I realized that I had basic blanks in my knowledge of how to use the tool. Hence these questions. I am hoping that someone can point me in the right direction. I did try to find this information in the tool docs, but there is a lot of documentation and I could not find some answers.

1. If I make a basic call like exiftool -tag1=value1 path1, will the call fail if the tag tag1 does not already exist in the image exif data?

2. Is there an option for adding a tag to an image? If so, what is it? I could not find it when I looked.

3. How do you add a value when the value itself contains spaces? I tried using quotes, but since the call failed I do not know if it failed because of the spaces or because of the quotes or for some other reason.

4. Are the tags case sensitive? I know from the docs that the options are not case sensitive, but I do not know about the tags.

5. Is there some way to disable the copy of the image that exiftool does when modifying the exif data? That is, to not create the _original file? I know it is important to have a backup, but I make a copy of the images before I run the tool so I do not need to have multiple originals.

There are more questions, but these would probably get me most of the way. I would appreciate any help, and thanks in advance.

Phil Harvey

Quote from: MikeFromMesa2 on March 10, 2018, 07:32:14 PM
1. If I make a basic call like exiftool -tag1=value1 path1, will the call fail if the tag tag1 does not already exist in the image exif data?

It will only fail if the tag is a MakerNote tag, but these are the only ones that can't be added or deleted individually.

Quote2. Is there an option for adding a tag to an image? If so, what is it? I could not find it when I looked.

-TAG=VALUE

Quote3. How do you add a value when the value itself contains spaces? I tried using quotes, but since the call failed I do not know if it failed because of the spaces or because of the quotes or for some other reason.

-TAG="value with spaces"

The exact method of quoting depends on the shell you are using and how you are calling ExifTool.

Quote4. Are the tags case sensitive? I know from the docs that the options are not case sensitive, but I do not know about the tags.

Tags are not case sensitive.

Quote5. Is there some way to disable the copy of the image that exiftool does when modifying the exif data? That is, to not create the _original file? I know it is important to have a backup, but I make a copy of the images before I run the tool so I do not need to have multiple originals.

-overwrite_original

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

MikeFromMesa2

#2
Thank you for the information as it answered all of my questions. But like many good answers it opened up some additional questions.

> It will only fail if the tag is a MakerNote tag, but these are the only ones that can't be added or deleted individually.

OK. That makes perfect sense, but when I looked at the exiftool information it said that MakerNote tags could be edited, but not added or deleted. This raises 3 questions.

1. When I gather all of the exif info, using the exiftool -s filePath command, does the response include the MakeNote tags as well as the other tags? Or do I need to issue a separate command to get the MakeNote tags?

1. Assuming MakerNote tags are returned with the regular information (assumption 1 above) how can I know if some tag is a MakeNote or not? and

2. Is there a special command to edit a tag that is a MakeNote? Or should the normal -tag=value filePath command work for tags that are MakerNotes as well as for other tags?

As part of this "wrapper" that I was writing to make my exif changes easier I was going to create an exif info object and it would be helpful to be able to identify some tag as being a MakerNote tag, but I have no idea how to tell if one is or not. I looked through the docs and could not see anything that told me how to determine if an individual tag is a MakerNote or not.





Phil Harvey

Quote from: MikeFromMesa2 on March 11, 2018, 07:53:03 AM
1. When I gather all of the exif info, using the exiftool -s filePath command, does the response include the MakeNote tags as well as the other tags? Or do I need to issue a separate command to get the MakeNote tags?

This includes MakerNote tags.  Add -G to your command to see where they come from. (And probably -a to so you get duplicate tags.)

Quote2. Is there a special command to edit a tag that is a MakeNote? Or should the normal -tag=value filePath command work for tags that are MakerNotes as well as for other tags?

The syntax is the same for all tags.

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

MikeFromMesa2

Thank you again. I appreciate your time, knowing that you must be very busy.

MikeFromMesa2

#5
Back for (I hope) one more question.

In testing my little app I have found that one of the tags I want to update exists in both the EXIF and MakerNotes sections. If I try to update the value for this tag will it update one, or the other, or both? Can I control which entry gets updated? If so, how?

UPDATE:

Never mind. I tested it and found the answer.