Writing one tag changes others?

Started by gmac, April 19, 2023, 12:27:55 PM

Previous topic - Next topic

gmac

I'm using exiftool version 12.25 on Linux (OpenSuse 15.3)
I ran a test to check my understanding of how the tool works. Here's what happened.

I took a jpeg image from my scanner and called it s1.jpg

exiftool s1.jpg

ExifTool Version Number         : 12.25
File Name                       : s1.jpg
Directory                       : .
File Size                       : 615 KiB
File Modification Date/Time     : 2023:04:19 16:49:01+01:00
File Access Date/Time           : 2023:04:19 16:49:01+01:00
File Inode Change Date/Time     : 2023:04:19 16:49:01+01:00
File Permissions                : -rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 300
Y Resolution                    : 300
Image Width                     : 2549
Image Height                    : 3506
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Image Size                      : 2549x3506
Megapixels                      : 8.9

I saved that output to a text file s1.txt, like this:

exiftool s1.jpg > s1.txt

I wrote a new tag to the scan image like this:

exiftool -UserComment='Here is a comment.' -o s2.jpg s1.jpg

I used exiftool to examine the tags and saved them to file s2.txt, like this:

exiftool s2.jpg >s2.txt

I used diff to compare s1.txt to s2.txt and found this:

diff s1.txt s2.txt
2c2
< File Name                       : s1.jpg
---
> File Name                       : s2.jpg
4,7c4,7
< File Size                       : 615 KiB
< File Modification Date/Time     : 2023:04:19 16:49:01+01:00
< File Access Date/Time           : 2023:04:19 16:49:19+01:00
< File Inode Change Date/Time     : 2023:04:19 16:49:01+01:00
---
> File Size                       : 616 KiB
> File Modification Date/Time     : 2023:04:19 16:50:02+01:00
> File Access Date/Time           : 2023:04:19 16:50:02+01:00
> File Inode Change Date/Time     : 2023:04:19 16:50:02+01:00
13c13
< Resolution Unit                 : inches
---
> Exif Byte Order                 : Big-endian (Motorola, MM)
15a16,22
> Resolution Unit                 : inches
> Y Cb Cr Positioning             : Centered
> Exif Version                    : 0232
> Components Configuration        : Y, Cb, Cr, -
> User Comment                    : Here is a comment.
> Flashpix Version                : 0100
> Color Space                     : Uncalibrated

I expected differences in the file names, sizes and dates/times.
I expected the User Comment.
I was surprised by the new tags "Y Cb Cr Positioning", "Components Configuration", "Flashpix Version" and "Color Space".

I'm clearly doing something wrong or misunderstand exif metadata.

Can anyone help, please?

StarGeek

If you look on the EXIF Tags page in the writable column for each of those tags, you will see that they have a colon at the end.  Mouse over that colon or read the fourth paragraph on the Tag names page, you will see that the colon means they are mandatory tags according to the EXIF spec.

* 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).

gmac