Edit IPTC, location code & name

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

Moderators: XnTriq, helmut, xnview, Dreamer

FKCapitalism2
Posts: 270
Joined: Sun Apr 23, 2023 5:14 am

Edit IPTC, location code & name

Post by FKCapitalism2 »

Introduction

IPTC standard v4.2 defines two fields for "copyright location".
Image

Even though IPTC standard does not mention it, this would be irrational to specify Location Code for country A and Location Name for country B, in most cases it should be same country e.g.

Code: Select all

[IPTC:Location]Country-Primary Location Code	: THA
[IPTC:Location]Country-Primary Location Name	: Thailand
Above IPTC fields represented inside XnViewMP by Metadata > Edit IPTC > Source as fields Country Code and Country

Image


Problem #1.

Field Country Code is populated from file country.txt located inside XnViewMP root folder, however field Country is not populated from this text file and has no drop down list.


Problem #2.

Fields Country Code and Country are not synchronized allowing selecting different country code and country, even though IPTC does not specify that both have to be the same, could you make check checkbox to have them synced by default and if checkbox unchecked then allow selecting different values.

Image


Problem #3.

Above location fields are more related to copyright info rather than geographical location, for location IPTC standard specify other fields called Content Location Code and Content Location Name for them IPTC specify that country code can't be different from country name.

Image

This fields are represented in XnViewMP as Content location code and Content Location Name

Image
  • Please also populate this two fields using data from country.txt as they also use ISO 3166 spec.
  • according to IPTC they must be hard synced, so no option to select different code and country should be provided

Problem #4.

Currently even if Content location code and Content location name are specified in XnViewMP they are not being saved to IPTC when pressing Write button. At least they are not written to RAW file.

Problem #5.

Please re-format the look of Source tab to place "copyright location" fields Country Code, Country and Original Transmission reference aside and next to each other on the bottom as they are not really related to location.

Perhaps you could also have checkbox (checked by default) that would auto populate this two optional "copyright location" fields Country Code and Country with whatever was selected in to the main location fields Content Location Code and Content Location Name
User avatar
xnview
Author of XnView
Posts: 44615
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Edit IPTC, location code & name

Post by xnview »

So if i understand correctly, you would like that 'country' is synced with 'country code', right?
So 'Country' can perhaps be not editableis always sync?

The same for 'content location code' with 'content location name', right?
But 'Content location name' can contain multiple name, not 'content location code'
FKCapitalism2 wrote: Wed Oct 04, 2023 12:58 pm Problem #4.

Currently even if Content location code and Content location name are specified in XnViewMP they are not being saved to IPTC when pressing Write button. At least they are not written to RAW file.
Please check on a JPEG file
Problem #5.

Please re-format the look of Source tab to place "copyright location" fields Country Code, Country and Original Transmission reference aside and next to each other on the bottom as they are not really related to location.
I don't understand 'country code' & 'Original Transmission reference' are already on the bottom...
Pierre.
FKCapitalism2
Posts: 270
Joined: Sun Apr 23, 2023 5:14 am

Re: Edit IPTC, location code & name

Post by FKCapitalism2 »

xnview wrote: Fri Oct 06, 2023 2:17 pm
FKCapitalism2 wrote: Wed Oct 04, 2023 12:58 pm Problem #4.

Currently even if Content location code and Content location name are specified in XnViewMP they are not being saved to IPTC when pressing Write button. At least they are not written to RAW file.
Please check on a JPEG file

Here is some weird thing i checked once more on same version and now i can't even write top two fields on Source tab, they are grayed out for every file i try to open. I have no idea how this happened earlier same day they were available. Grayed out for both .arw and .jpg

Image

xnview wrote: Fri Oct 06, 2023 2:17 pm
Problem #5.

Please re-format the look of Source tab to place "copyright location" fields Country Code, Country and Original Transmission reference aside and next to each other on the bottom as they are not really related to location.
I don't understand 'country code' & 'Original Transmission reference' are already on the bottom...
I mean this 3 fields are related to copyright info more than location info

Image

think they should be moved away from other fields on Option tab into separated group so its clear that they not really to be used for marking location, because now its like its very confusing, i will provide drawing of my suggestion soon.
FKCapitalism2
Posts: 270
Joined: Sun Apr 23, 2023 5:14 am

Re: Edit IPTC, location code & name

Post by FKCapitalism2 »

xnview wrote: Fri Oct 06, 2023 2:17 pmI don't understand 'country code' & 'Original Transmission reference' are already on the bottom...
I believe following layout is very straight forward and less confusing to the users.

Image

When "Use geographic location for copyright location" checkbox is checked then Country / Primary Location code, Country / Primary Location Name (on the bottom of form) are grayed out and filled with same values as geographic location Country Code and Country Name (on top of the form).
If checkbox unchecked then its not grayed out anymore and user can enter values on their own.
xnview wrote: Fri Oct 06, 2023 2:17 pmSo if i understand correctly, you would like that 'country' is synced with 'country code', right?
(at the top of the form) both fields Country code and Country name it should always be same.
xnview wrote: Fri Oct 06, 2023 2:17 pm So 'Country' can perhaps be not editableis always sync?
(at the top of the form) Country code field is ALWAYS grayed out and populated automatically based on selection in Country name drop-down list.
xnview wrote: Fri Oct 06, 2023 2:17 pmThe same for 'content location code' with 'content location name', right?
But 'Content location name' can contain multiple name, not 'content location code'
(On the bottom of the form) if Synced checkbox is checked then same as on top, Country / Primary Location code grayed out and populated based on selection in Country / Primary Location Name.
If Synced checkbox unchecked Country / Primary Location code is NOT grayed out, user can select any value, is NOT populated from Country / Primary Location Name.



Field Country Name (at the top of the form) and fields Country / Primary Location code, Country / Primary Location Name (on the bottom of the form) are all drop downs populated with values from file "country.txt".
User avatar
xnview
Author of XnView
Posts: 44615
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Edit IPTC, location code & name

Post by xnview »

FKCapitalism2 wrote: Fri Oct 06, 2023 3:34 pm
xnview wrote: Fri Oct 06, 2023 2:17 pm
FKCapitalism2 wrote: Wed Oct 04, 2023 12:58 pm Problem #4.

Currently even if Content location code and Content location name are specified in XnViewMP they are not being saved to IPTC when pressing Write button. At least they are not written to RAW file.
Please check on a JPEG file

Here is some weird thing i checked once more on same version and now i can't even write top two fields on Source tab, they are grayed out for every file i try to open. I have no idea how this happened earlier same day they were available. Grayed out for both .arw and .jpg
It's when you are using mode "XMP update IPTC", you should have IPTC
Pierre.
mudo_j
Posts: 53
Joined: Fri Feb 17, 2017 7:01 pm

Re: Edit IPTC, location code & name

Post by mudo_j »

Just a small remark:

I am using XnView MP with English GUI, while I am writing country names in my native language.

Please, keep this possible somehow. In digiKam, it is not possible because of how synchronisation between country codes and country names is done. English GUI enforces country names in English.