IPTC Location fields not written after write-back

Started by Pascal, October 05, 2023, 09:27:29 AM

Previous topic - Next topic

Pascal

When they are initially empty, it seems that most of the IPTC Location fields are not written into the picture file, except "ISO Country Code". The fields "City", "Location", "Country" and "State/Province" are empty again after doing a write-back to the file. I didn't check other fields.

On the other hand, if these IPTC fields contain initially something, they can be changed and written. I observed this behavior after having recently migrated from iMatch 2021 to 2023 : the IPTC Location fields of my old photos, filled with the 2021 version, can still be modified, but not the new photos I just imported into the 2023 version.

Mario

#1
I assume you are talking about legacy IPTC (IIM) IPTC tags? Or the IPTC tags which are part of the XMP IPTC and XMP IPTCExt metadata?`

As per recommendation of the IPTC and the MWG, IMatch does by default not create legacy IPTC data anymore. Legacy IIM IPTC data has been replaced by IPTC data as part of XMP 20 years ago! For very good reasons.
IMatch maintains legacy IPTC when it exists in the file.

See also Per File Extension Options for related information.

I have not worked on this for many years, but I guess that ISO Country Code is written if there is no pre-existing legacy IPTC data in the file is a side effect of something else. Not sure.

Please clarify and provide a sample image that exhibits this behavior. You can ZIP and attach files up to 5 MB to your posts or send it (with a link back to this thread!) to support email address.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pascal

I provided more informations by email. I'm not sure if the IPTC Location fields I'm using (until now) are legacy fields or not... I only know that I wrote these fields under iMatch 2021 with no problems.

Mario

Sending emails with "details" is discouraged. 
Because this would open a second thread of discussion, dividing information between emails and this community.

How do you write these tags?
Which metadata panel layout do you use? The "6 IPTC Location" is the official way to input location data like city, country etc.

Don't fill out legacy IPTC tags directly. During write-back, IMatch produces legacy IPTC data from XMP metadata, e.g. mapping XMP::iptcExt\LocationShownCity to various other "City" tags in various metadata formats, including legacy IPTC.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pascal

I use the "Default" panel, for years. Was I wrong ?

Mario

Which IMatch version do you use? Check Help menu > About IMatch.

I have downloaded your file.
It does contain the country code FRA in the XMP-iptcCore\Country Code tag.
In the Metadata Panel, I add the GPS coordinates and location data from one of my AutoFill templates:

Image2.jpg

and write back. No error messages, no warnings. The metadata in the file now shows the same information I've entered in the Metadata Panel:

[XMP-iptcCore]  Country Code                  : UK
[XMP-iptcExt]  Location Created GPS Latitude  : 51 deg 30' 5.46" N
[XMP-iptcExt]  Location Created GPS Longitude : 0 deg 8' 30.57" W
[XMP-iptcExt]  Location Shown City            : London
[XMP-iptcExt]  Location Shown Country Code    : UK
[XMP-iptcExt]  Location Shown Country Name    : United Kingdom
[XMP-iptcExt]  Location Shown Province State  : London
[XMP-iptcExt]  Location Shown Sublocation     : Buckingham Palace
[XMP-exif]      Color Space                   : sRGB
[XMP-exif]      Date/Time Original            : 2023:10:05 11:12:30
[XMP-exif]      GPS Latitude                  : 51 deg 30' 5.46" N
[XMP-exif]      GPS Longitude                 : 0 deg 8' 30.57" W

I can also enter individual values, e.g. for City, or change the City. The write-back is successful and the data in the file is correct.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pascal

The version I use is iMatch 2023.3.4, which I bought and installed yesterday over the version 2021.18.4 and my existing database.
This previous version worked perfectly until the upgrade to 2023, for the situation I describe.

Why is the ISO Country Code the only back written value, and not the others, when the fields are initially empty?
Have you tried to fill and write-back the other fields in the file I sent to you?

If these fields already contain something, as it is the case for the files I previously tagged with iMatch 2021, everything works fine. The problem occurs only for new files.

Maybe I'm doing something wrong or a parameter is bad??

Mario

Very strange. I will investigate further.

Please switch to the MD Panel layout "6. IPTC Location" and enter your location data there. Location Shown, for example.
Or set the coordinates on the Map Panel and do a reverse geocoding.
If you don't have this layout, you can import it from "C:\ProgramData\photools.com\IMatch6\Presets\system.immdl"

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pascal

It's better. The fields I filled in the layout "6. IPTC Location" are correctly written, and I find their values duplicated under "1. Default"

Mario

The Composite City tag you enter a value for is mapped to XMP::IPTCExt::LocationShownCity, and this tag is part of the structured tag location shown. Structured tags must be written completely, since writing individual parts of the structure may have unwanted side effects, especially for repeatable structured tags.

IMatch maps your change to the made-up Composite tag to the correct structured tag. When producing the commands for ExifTool, IMatch for some reason does not notice that a tag that is part of a structure is written and does not mark the structure for write-back. I guess. This is what's causing the problem.

Until I release a fix, please don't use individual composite fields.
Use the official location fields for location shown/created to add location data to files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pascal

Thank you, I will follow your instructions in the meantime.

Pascal

Sorry... The layout "6. IPTC Locations" is only visible in the database I newly created for my tests. It doesn't show when I open my existing working database.

I tried to follow your instructions saying to import the layout from "C:\ProgramData\photools.com\IMatch6\Presets\system.immdl"

I see the file but I don't know how to import it as a layout. I looked everywhere, including the Help system, but did not find the procedure. Can you help me ? Thank you...

Mario

I have fixed this issue for IMatch 2023.3.6 (out soon).

To import (or export) Metadata Panel layouts, click on the Gear icon in the Metadata Panel toolbar and select "Edit" from the menu. Then click on "Import panel layouts..." and select the system.immdl file.

See Editing Metadata Panel Layouts
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook