EXIF tags shown in json output, but should not

Started by poggenpower, May 03, 2020, 07:42:19 PM

Previous topic - Next topic

poggenpower

Affected Versions
$ exiftool -ver
11.85

on MacOS

# exiftool -ver
11.16

on Linux

Requesting the RatingPercentage explicit, it will be shown

$  exiftool   -RatingPercent 20100530-181633-P1000689.JPG
Rating Percent                  : 75


but but seperated by group name only the XMP tag is shown

$  exiftool -G  -RatingPercent 20100530-181633-P1000689.JPG
[XMP]           Rating Percent                  : 75


Using the json output it will be shown for XMP and EXIF

$  exiftool -G -j -RatingPercent 20100530-181633-P1000689.JPG
[{
  "SourceFile": "20100530-181633-P1000689.JPG",
  "EXIF:RatingPercent": 75,
  "XMP:RatingPercent": 75
}]

Using other tools like digikam or MacOS Preview don't show the "RantingPercentage" Tag in Exif data.

Same I found for the "Rating" Tag.

Sample file is attached.

StarGeek

From the docs on the -j (Jsonfile) option
     The -a option is implied if the -g or -G options are used

The -a (duplicates) option isn't used in your non-json commands.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

poggenpower

But this is strange behavior! Shouldn't the `-a` option than implicit in any case `-g` or `-G`, because if I request the group names I don't want exiftool to decide if I want to see it under `XMP` or `EXIF` or whatever.


Phil Harvey

Maybe, but that's not the way it evolved.

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

poggenpower

Thanks Phil,

I am still not sure if there is really EXIF data for "Rating" in coded into the file.
As said I tried to view them if other tools. Last I have tried php 7.3 read_exif_data() without luck.
I know that exiftool is the leading tool in this space, but still wonder about the different outputs.

Would you mind to take a look into the file attached above and confirm that there is really an EXIF tag with that name.

Thanks
  Thomas

poggenpower

Found it, php read_exif_data()
shows it as:
   
    [UndefinedTag:0x4746] => 4
    [UndefinedTag:0x4749] => 75

So thanks for your support!

Phil Harvey

> exiftool 20100530-181633-P1000689.JPG -"*rating*" -H -G1 -a
[IFD0]          0x4746 Rating                          : 4
[IFD0]          0x4749 Rating Percent                  : 75
[XMP-xmp]            - Rating                          : 4
[XMP-microsoft]      - Rating Percent                  : 75
[XMP-acdsee]         - Rating                          : 4


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