1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
lasy
Posts: 2
Joined: Wed Jul 17, 2024 7:29 am

1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

Post by lasy »

XnView: MP 1.7.2 - 64-bit
OS: macOS Monterey 12.7.5

The preferences are set to write hierarchical keywords to IPTC data when the categories of a jpeg file is changed. But only the last word is written when the categories are set by "Category" context menu or "Category" dropdown in the toolbar. The hierarchical keywords are written as expected by tick the checkboxes in the "Categories" panel.

Effect: only the last word of hierarchical keywords is written.

To reproduce:

1. Set preferences to enable writting hierarchical keywords to IPTC data
settings.png
2. Create hierarchical categories

3. Select a jpeg file, set the categories by check the checkboxes in the "Categories" panel
categories.png
categories.png (12.81 KiB) Viewed 610 times
4. Check the IPTC keywords in "Info" panel (may need to press F5 to refresh)
info_iptc_1.png
info_iptc_1.png (16.58 KiB) Viewed 610 times
info_xmp.png
info_xmp.png (17.01 KiB) Viewed 610 times
Both the IPTC and XMP data are correct.

5. Now set the categories by "Category" context menu (or the dropdown in the toolbar)
category_menu.png
category_menu.png (38.15 KiB) Viewed 610 times
6. Do the same as Step 4
info_iptc_2.png
info_iptc_2.png (15.71 KiB) Viewed 610 times
info_xmp.png
info_xmp.png (17.01 KiB) Viewed 610 times
The IPTC data contains only the last word, the XMP data is correct.

Actual behaviour (bug): the behaviors of those two methods to set categories are not consistent.

Expected behaviour: the behaviors of those two methods are consistent and the IPDC is set correctly by either of them.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: 1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

Post by michel038 »

Classical keywords structure for three keywords : World, Asia, China

1) Without hierarchy :
Xmp-dc-subject : World, Asia, China
This metadata is a list, so we can also display
Xmp-dc-subject(1) World
Xmp-dc-subject(2) Asia
Xmp-dc-subject(3) China

Xmp-lr:hierarchicalSubject(1) World
Xmp-lr:hierarchicalSubject(2) Asia
Xmp-lr:hierarchicalSubject(3) China

IPTC:keywords : World, Asia, China
This metadata is also a list, so we can also diplay
IPTC:keywords(1) World
IPTC:keywords(2) Asia
IPTC:keywords(3) China

2) With hierarchy
Xmp-dc-subject(1) World
Xmp-dc-subject(2) Asia
Xmp-dc-subject(3) China
(no hierarchy in "subject" metadata)

Xmp-lr:hierarchicalSubject[1] World
Xmp-lr:hierarchicalSubject[2] World|Asia
Xmp-lr:hierarchicalSubject[3] World|Asia|China


IPTC:keywords(1) World
IPTC:keywords(2) World|Asia
IPTC:keywords(3) World|Asia|China
When displayed in a single line :
IPTC:keywords : World, World|Asia, World|Asia|China

-----------
In your example, you give the impression that you only want to create the keyword “China”, and not World and Asia ...
So I can't imagine a hierarchical pattern for a single keyword.

In order to create the classical pattern, you should tick "Automatic assign parent category" , so XnViewMp will create the complete pattern ...
Post Reply