ExifTool Forum

ExifTool => Newbies => Topic started by: Allbiez on August 19, 2021, 05:26:56 PM

Title: Adding new EXIF information.
Post by: Allbiez on August 19, 2021, 05:26:56 PM
Hi Everyone,

1) Today someone asked me to fix some EXIF information and add new ones.
I watched a few videos and looked at the information on the site; but I still haven't found a solution.

I present an example below for clarity.

Information I want to add:
Tag: CompositeImage
Value: 2

How do I add this and any other information I want to the picture?
PS: I'm new at this so instead of providing a link please provide an example of what command I can do with it.

2) Also, why is the "Aperture Value" '.' or I can't write with numbers with ','?
Sample:
Aperture Value: 1.696

3) Let's say I have a list.
How do I get it to import the information in this list to all images.

You can find the information I want to add and the list of other examples from the link below.

Footnote: There is a "|" sign at the beginning of the information I want to add.
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 19, 2021, 06:24:51 PM
Start off by using the command in FAQ #3 (https://exiftool.org/faq.html#Q3) to see the tag names and the location of those tags.  Copy/paste the results into the post, select the output and hit the Code button ->(https://exiftool.org/forum/Themes/default/images/bbc/code.gif)  Attaching text output is more time consuming than just putting it in the post.

The command in FAQ 3 gives you the actual names of the tags, not the descriptions (FAQ #2 (https://exiftool.org/faq.html#Q2)).  You would then simply set the tags with this, replacing "TAG" with the name of the tag you want to change
exiftool -TAG=NewValue -TAG=AnotherValue file.jpg
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 19, 2021, 09:13:42 PM
Hi StarGeek,

I did what you said.
However, I think what I want is not the same as what you are describing.
I executed the command: exiftool -a -G1 -s c:\images\test.jpg

I saw the list.
But I already know how to change what's on this list.
I want to add an EXIF information that is not in this list.
And this does not happen with the command you said.

PS D:\Exif> exiftool -CompositeImage=2 .\Editable.jpg
Warning: Can't convert ExifIFD:CompositeImage (not in PrintConv)
Nothing to do.
PS D:\Exif>

Can you review the text file in the appendix of the topic?

| I want to add the ones that have the sign.
This information is not in the picture I want to add.
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 19, 2021, 09:44:14 PM
Ah, ok.  The "PrintConv" error is covered in FAQ #6 (https://exiftool.org/faq.html#Q6).

When look at the EXIF tags page (https://exiftool.org/TagNames/EXIF.html), you'll see that CompositeImage has a list of option under notes
0 = Unknown
1 = Not a Composite Image
2 = General Composite Image
3 = Composite Image Captured While Shooting

So you would set it with -CompositeImage=unknown, -CompositeImage="Not a Composite Image", etc.  And as per FAQ 6, you shorten it as long as the text is unique to that entry.  So -CompositeImage=Shooting will set the value to "Composite Image Captured While Shooting".

To set the raw number, you use the -n (--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv) or its hashtag shortcut. 
exiftool -CompositeImage=2 -n file.jpg
or
exiftool -CompositeImage#=2 file.jpg
If you were setting more than one tag at the same time, then you would want to use the latter version, as using -n will affect all tags written in the command.

Look up tags that give you the "PrintConv" error on the appropriate Tag Names page (https://exiftool.org/TagNames/) to see what are the allowed options for that tag.
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 19, 2021, 10:47:18 PM
When I try the commands I get an error like this...

Warning: [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto - ./Editable.jpg

How can I fix this?
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 19, 2021, 11:09:58 PM
It's only a minor warning.  It can be safely ignored.  At some point Microsoft changed part of their XMP URI by adding/removing a trailing slash, I can't remember which.  About the only program that will notice this is exiftool.

If you really feel the need, you can run this command.  It will re-write all the Microsoft XMP tags.  But, depending upon which programs you are using, it is quite possible to pop up again. Which is why I suggest ignoring it.
exiftool -if "$XMP-microsoft:all" -P -XMP-microsoft:all= -tagsfromfile @ -XMP-microsoft:all /path/to/files/
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 19, 2021, 11:20:54 PM
Well, I can ignore the error.

By the way, I was able to add thank you for this...

Now there are two more things I am wondering about.

1) Is it possible for me to automatically add all the data from the text file in the subject to other images?
If possible, how can I do this?

2) How can we automatically add all the META information from one image to another image?
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 19, 2021, 11:46:33 PM
Quote from: Allbiez on August 19, 2021, 11:20:54 PM
1) Is it possible for me to automatically add all the data from the text file in the subject to other images?
If possible, how can I do this?

I don't quite understand what you mean.  But you can't add data from any old text file.  You can use a CSV or JSON file (see FAQ #26 (https://exiftool.org/faq.html#Q26)).  Or you can create an args file and use the -@ (Argfile) option (https://exiftool.org/exiftool_pod.html#ARGFILE).

Quote2) How can we automatically add all the META information from one image to another image?

You would use the -TagsFromFile option (https://exiftool.org/exiftool_pod.html#tagsFromFile-SRCFILE-or-FMT).  See the Copying Examples (https://exiftool.org/exiftool_pod.html#COPYING-EXAMPLES) section of the docs, specifically the second example (https://exiftool.org/exiftool_pod.html#exiftool--TagsFromFile-src.jpg--all:all-dst.jpg).
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 20, 2021, 12:21:12 AM
I was able to copy the data to another.

Thanks for all the information so far.

Also; the information given to me includes:

| Exposure Compensation Value: 0
| Photo Sensitivity (ISO): 32
| Less Than Seconds (Numeric): 077
| Less Than Seconds (Original): 077

I couldn't find any of this data in EXIF.
I executed the command for Available EXIF tags.
And I made all the data a single line through a text file.
However, even if I searched the above data by separating it into words, I could not find it.

Do you have any idea how I can generate this data?


Finally; Do you have any information about the answer to question number 2 in the title?
Why can't I enter 1.695 for ApertureValue?
And for Brightness Value: 5,959
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 20, 2021, 11:56:20 AM
Quote from: Allbiez on August 20, 2021, 12:21:12 AMAlso; the information given to me includes:

| Exposure Compensation Value: 0
| Photo Sensitivity (ISO): 32
| Less Than Seconds (Numeric): 077
| Less Than Seconds (Original): 077

I couldn't find any of this data in EXIF.

On the above linked EXIF page, I can see the ExposureCompensation tag, which might be what you want.  For Photo Sensitivity, I'm not sure.  An ISO of 32 seems low, so it doesn't seem like it would be the ISO tag.

You'll have to ask for more details or a sample containing the data from the person you're asking you to do this.  I can't find anything that resembles "Less Than Seconds" on any of the tag pages.

QuoteFinally; Do you have any information about the answer to question number 2 in the title?
Why can't I enter 1.695 for ApertureValue?
And for Brightness Value: 5,959

It works here, though ApertureValue does get rounded because it is stored as a rational number rather than a floating point, but is displayed as a floating point (see note under its entry on the above linked EXIF tags page).  The raw value is closer to what you input.
C:\>exiftool -P -overwrite_original -ApertureValue=1.695 -BrightnessValue=5.959 y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G -a -s -ApertureValue -ApertureValue# -BrightnessValue y:\!temp\Test4.jpg
[EXIF]          ApertureValue                   : 1.7
[EXIF]          ApertureValue                   : 1.69499999193839
[EXIF]          BrightnessValue                 : 5.959
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 20, 2021, 01:20:18 PM
I implemented the code you specified.
But I am getting error.

The code I implemented:
D:\Exif> exiftool -P -overwrite_original -ApertureValue=1.695 -BrightnessValue=5.959 D:\Exif\one.jpg

Error: File not found - .695
Error: File not found - .959
     1 image files updated
     2 files weren't updated due to errors

You guys did not get this error; but i'm getting it.
I have attached a picture of the result.

○Yes... I couldn't find the "Less Than Seconds" parameter either.
That's why I wanted to know if I'm missing something.

Other than that, the last TAG I couldn't find is "Measuring Mode: Patterned".
There is a TAG with another name; but it doesn't have "PATTERNED" value either.

I do not know why; but the other party did not submit a picture containing this information.
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 20, 2021, 03:24:06 PM
Ok, yet another brain dead behavior from PowerShell.  As the highlighting shows, for whatever reason, PS considers -ApertureValue=1 and .695 to be two separate arguments.

Use CMD or put quotes around the values, e.g. -ApertureValue='1.695'
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 20, 2021, 03:42:49 PM
Hi StarGeek,

I did what you said; and yes the quotes fixed the problem.

Thank you for answering all the question marks.

Have a nice days/nights.
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 20, 2021, 06:41:26 PM
Quote from: Allbiez on August 20, 2021, 12:21:12 AM
| Less Than Seconds (Numeric): 077
| Less Than Seconds (Original): 077

Just realizing that there might be translation errors taking place.  These might be SubSecTime (fractional seconds for ModifyDate), SubSecTimeOriginal (fractional seconds for DateTimeOriginal), or SubSecTimeDigitized (fractional seconds for CreateDate).
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 20, 2021, 06:57:07 PM
I was able to enter the values.
I will forward the result to the other party to verify.

If true, I will have completed everything except "Measuring Mode: Patterned".
I can only "Patterned" value for this TAG via Windows File Details.
I couldn't see the "Patterned" option on Exiftool.
Title: Re: Adding new EXIF information.
Post by: Hubert on August 21, 2021, 07:57:30 AM
Quote from: Allbiez on August 20, 2021, 06:57:07 PM

If true, I will have completed everything except "Measuring Mode: Patterned".
I can only "Patterned" value for this TAG via Windows File Details.
I couldn't see the "Patterned" option on Exiftool.

Maybe Metering Mode?
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 21, 2021, 09:15:59 AM
That's what I thought of as a similar alias. I just couldn't see the "Patterned" option in the values.
I think this value corresponds to "Multi-segment".

I did everything; but there is something i am wondering about.
In some commands, I get the following warning in ICC_Profile commands.
Warning: Sorry, ProfileCreator is not writable
Nothing to do.

When "NO" is written in the "Writable" section for the tags, we cannot add that data to the picture in any way, right?

Because when I copied the picture with the information to another picture, I saw that some information was not transferred.
I wanted to ask because everything is possible with codes and to clarify the situation.

Title: Re: Adding new EXIF information.
Post by: StarGeek on August 21, 2021, 10:25:27 AM
Quote from: Allbiez on August 21, 2021, 09:15:59 AM
I did everything; but there is something i am wondering about.
In some commands, I get the following warning in ICC_Profile commands.
Warning: Sorry, ProfileCreator is not writable
Nothing to do.

When "NO" is written in the "Writable" section for the tags, we cannot add that data to the picture in any way, right?

This is where things get really complicated.  There are tags which are editable but you cannot create them.  Most commonly these are the proprietary tags that camera makers add to file, collectively called MakerNotes.  This encompasses a lot of groups, listed by the company names on the Tag Names page (https://exiftool.org/TagNames/).

Then there are tags like those included in the ICC_Profile.  Most of these cannot be edited and they can't be created.  Additionally, they are marked as Unsafe because, obviously, changing them may significantly affect the colors of the image.

In both these cases, while you can't copy individual tags, you can copy the whole block.  See last paragraph under FAQ #9 (https://exiftool.org/faq.html#Q9). This is also useful when dealing with tags that exiftool doesn't have definitions for.  For example, proprietary or obscure tags in XMP, which exiftool can list but cannot create.

To copy Makernotes as a block you would use
-TagsFromFile SOURCE -MakerNotes TARGET

In the case of the ICC_Profile, you can copy it as a block
-TagsFromFile SOURCE -ICC_Profile TARGET
but there is also the ColorSpaceTags shortcut (see Shortcut tags page (https://exiftool.org/TagNames/Shortcuts.html)) which will copy it and a few other color space related tags
-TagsFromFile SOURCE -ColorSpaceTags TARGET
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 21, 2021, 12:07:38 PM
It worked.
Thank you so much.

Meanwhile, I run the following command: but "FileAccessDate" is not updating.
I want to make all recipes the same.

Command: exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" sample.jpg
Title: Re: Adding new EXIF information.
Post by: StarGeek on August 21, 2021, 12:18:17 PM
FileAccessDate is not directly writable, but it should update to be the same as FileModifyDate when FileModifyDate is changed.  It works here so I don't know why it isn't working for you.

But FileAccessDate is a completely useless system timestamp.  The fact that the value will update every time you access the file means it will always be changing.  On my Win 10 system, just hitting properties on the file changes the value of this tag.
Title: Re: Adding new EXIF information.
Post by: Allbiez on August 21, 2021, 12:49:54 PM
It's good to know it's not worth the effort.
Thank you, StarGeek.
Thank you very much for your interest and help in all matters.