Adding new EXIF information.

Started by Allbiez, August 19, 2021, 05:26:56 PM

Previous topic - Next topic

Allbiez

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.

StarGeek

Start off by using the command in FAQ #3 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 ->  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).  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
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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.

StarGeek

Ah, ok.  The "PrintConv" error is covered in FAQ #6.

When look at the EXIF tags page, 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 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 to see what are the allowed options for that tag.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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?

StarGeek

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/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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?

StarGeek

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).  Or you can create an args file and use the -@ (Argfile) option.

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

You would use the -TagsFromFile option.  See the Copying Examples section of the docs, specifically the second example.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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

StarGeek

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
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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.

StarGeek

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'
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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.

StarGeek

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).
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Allbiez

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.