Exporting Categories to IPTC Keywords does not work

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

Dears, I need help, figuring out how to export the distributed categories from the internal database to IPTC, embedded into the JPG-files, please!

I spent hours, searching the forum and fiddeling around with various settings. Tried with the portable ZIP version as well as with the installed version (Xnview MP 1.00) - under Windows 10, but had no success at all... For instance, I tried as explained in here viewtopic.php?f=62&t=42927&p=176592&hil ... es#p176592 but with no success.

I am testing with only 1 folder with 2 files in it. Please see attached my "tools-->settings-->metadata"
Settings.png
as well as my "tools-->metadata--->edit IPTC" settings
Screenshot 2022-06-09 175219.png
Screenshot 2022-06-09 175219.png (13.93 KiB) Viewed 6237 times
With these preparations, I choose 2 pictures and go to "view-->update files from catalog"...
And it happens.... nothing. Exactly, nothing. But, when I change a category or add a tick-mark, the files do get updated.

What am I doing wrong? How can I make an export of the internal catalog to IPTC keywords?

Thanks a lot for investing some time in me... :?
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by michel038 »

Hi,
The parameters you show seem to be correct.
Strange behaviour !
I guess you have lot of pictures having 1 or more categories, and no embedded keywords ?

Did I understand correctly when you said " I choose 2 pictures and go to view-->update files from catalog"
...that means that the 2 pictures were selected in the browser view before updating ?

1) Let's assume that the catalog is correct
Update files from catalog :
Perhaps can you try some changes, to help us to imagine a solution ?
- Check "Create XMP" instead of create iptc, and see if categories becomes xmp keywords ?
- Add "Write categories as hierarchical keywords" and see if xmp hierarchical keywords are added ?
- Add "Update or create xmp sidecar" and see if a xmp file is created, and if it contains data ?

2) If the catalog contains some mysterious errors
Choose a place where a sample jpg photo was never updated by xnviexmp
- Disable "export category to xmp subject and iptc keyword"
- Select a photo, give it a category, unselect the photo (by selecting anything else)
Now, the catalog has probably this right data, but no keywords are in the photo.
- Enable "export category to xmp subject and iptc keyword" and "create iptc"
Select the photo, and Update files from catalog ...
What is the result in iptc info ?
User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Re: Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

Thanks michel038, for looking into this. In fact, I was hoping you find the time to support.
Puuuh, I tried to follow your advice.
Did I understand correctly when you said " I choose 2 pictures and go to view-->update files from catalog"
...that means that the 2 pictures were selected in the browser view before updating ?
Yes, correct. Anything wrong with that?
1) Let's assume that the catalog is correct
I do think so, because it is either a fresh install or a fresh folder with the extracted files in it...
- Check "Create XMP" instead of create iptc, and see if categories becomes xmp keywords ?
Nothing happens. No xmp keywords are written.
- Add "Write categories as hierarchical keywords" and see if xmp hierarchical keywords are added ?
No hierarchical keywords, either
- Add "Update or create xmp sidecar" and see if a xmp file is created, and if it contains data ?
Yes, they get created, but with "nothing in there" - at least no added data.
Screenshot 2022-06-09 193643.png
Screenshot 2022-06-09 193643.png (9.18 KiB) Viewed 6212 times
2) If the catalog contains some mysterious errors... What is the result in iptc info ?
The same as before - no IPTC data is written at all.

To me it seems, this is the same :bug:, that was described here, already: https://forum.xnview.com/viewtopic.php? ... fb#p159609

I really appreciate your efforts and support! Thank you!
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by michel038 »

I cannot reproduce ...

Can you try to add an IPTC information first ?
Choose a photo that already has a category.
Tools>Metadata>Edit IPTC
Enter a caption or a title and "Write", so an iptc data will be added in the photo. Check this in IPTC info tab.

Ensure that "Export category ..." and "create IPTC" are still checked
Now Click "Update files from catalog" on this photo to try to make a category to be copied in keywords.
is it ok ?

Other checking:
Display Xnview.ini file in a text editor (Notepad ...) [Keywords] section.
Can you see these lines ?

Code: Select all

export=true
exportFlags=2
or exportFlags=3
User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Re: Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

I cannot reproduce ...
Then I guess, I'm doing something wrong...

I will check as per your advice and get back to you during the day or weekend. Need to get to work now... 😉
User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Re: Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

The xnview.ini seems to be fine:

Code: Select all

[Keywords]
import=true
export=true
exportFlags=2
applyParent=true
readHierarchical=true
writeHierarchical=false
characters=2
updateSidecar=false
useFilenameXmp=true
updateFileChanged=false
importFace=false
Can you try to add an IPTC information first ?
:!: That obviously does the trick... :!:

I added a keyword - say "Test_A" via IrfanView IPTC editor window and saved. Then exited IrfanView.
Returned to XnView and did try "Update files from catalog" with this previously edited file.
As result, "update file from catalog" DELETED the previous keyword "Test_A" and wrote the keywords from the catalog (XnView database) correctly.
Don't know why it DELETES the "Test_A" keyword, because "tools-->settings-->metadata" says keep values and just add new ones...

So my conclusion is, XnView is not able to create the IPTC section, but it can only change / alter it :?: :!:
That is indeed a problem for me, as not all files have an IPTC section, yet or when they come from fresh from the camera... :shock:

And XnView always adds the XMP section, no matter what you choose under "tools-->settings-->metadata" or what is set under
"tools-->metadata-->edit ITPC" in the "mode" pulldown-field...

Something is quite buggy :bug: in the settings and functions for IPTC / XMP edit, from my point of view... Maybe Pierre can look into this.
Again, my thanks to you, michel038, for your support and patience!
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by xnview »

OnkelTom wrote: Fri Jun 10, 2022 12:40 pm I added a keyword - say "Test_A" via IrfanView IPTC editor window and saved. Then exited IrfanView.
Returned to XnView and did try "Update files from catalog" with this previously edited file.
As result, "update file from catalog" DELETED the previous keyword "Test_A" and wrote the keywords from the catalog (XnView database) correctly.
Strange, i can't reproduce. With 'update files from catalog' only XMP is updated not IPTC
Could you send me the file used?
Don't know why it DELETES the "Test_A" keyword, because "tools-->settings-->metadata" says keep values and just add new ones...
This is a setting for 'Edit IPTC' not global
And XnView always adds the XMP section, no matter what you choose under "tools-->settings-->metadata" or what is set under
"tools-->metadata-->edit ITPC" in the "mode" pulldown-field...
I can't reproduce, if you have 'IPTC IIM only' mode
Pierre.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by michel038 »

Update files from catalog

In this post, I am not using "Edit IPTC" nor "Edit XMP" dialogs
So, settings are only in "Settings>Metadata screen .
Let us use a photo that has a category, and where IPTC and XMP spaces are empty (Tools>metadata>Clean)

TEST #1
- No options ticked
- "Update files from catalog" Will create XMP sidecar file with exif data.
Known behaviour, but still so strange : "Create sidecar" was not ticked ...

TEST #2
- Only 1 option ticked : "Export categories..." ( No IPTC and no XMP options)
- "Update files from catalog" will create XMP fields. :bug: Bug1 : "Create XMP" is not ticked
(Info : if iptc or xmp data were already present, keywords are updated. That's OK, see last lines of this post)

TEST #3
- "Export" and "Create XMP" are ticked
- "Update files from catalog" will create XMP fields with Keywords. No bug here, OK
- (But why are the rating and labels fields always created if not needed ? )

TEST #4
- "Export" and "Create IPTC" are ticked
- "Update files from catalog"
:bug: Bug1 : "Create XMP" is not ticked , XMP fields are created
:bug: Bug2 : "Create IPTC" is ticked and IPTC fields are not created
(Yes, I can reproduce now ! Previously, all my photos had already an iptc space, sometimes only CodedCharacterSet = UTF 8 only shown in ExifTool tab)

TEST #5
- "Export" and "Create IPTC" and "Create XMP" are ticked
:bug: Bug2 IPTC fields missing

---

(Info : If we first add a caption in IPTC and XMP fields, "Create IPTC" and "Create XMP" options are not significant , because IPTC and XMP are already existing, no need to create them. In this case, IPTC Keywords and XMP Subject can always be exported with "Update files from catalog" function.
But existing keywords will be erased without warning ! :evil: bug 3 ? )

Edit : 14/06/2022 Working in progress on these bugs with XnView developper
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by michel038 »

OnkelTom, everything you wrote was correct,

except
Then I guess, I'm doing something wrong...
:D
I think these bugs will be solved in next version
User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Re: Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

First, I would like to apologize for not answering or following you, michel038.
Was not online for a few days...

Again, I would like to express my thanks for your efforts, tests and checks.

This was/is driving me crazy, as I am planning to tag a few thousand pics on my NAS, which is an enormous plan...
...and my Syno-NAS e.g. seems to prefer the XMP:dc section over anything else. So the (non-hierarchical) subjects are overriding any other values of XMP:lr or IPTC keywords...

Longing for the new version and crossing my fingers, that the developer can help :wink:

All the best for you and keep up your great work!!!

Edit: Also thanks to Pierre, who joined. If you need any additional info from my side, let me know.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by michel038 »

If IPTC keywords are not useful to you, you can ignore them for the moment.
You can even update them later, if you find it useful.
The xmp-lr:hierarchical don't bother, and they are a backup in case you have to rebuild the category database (the catalog).

(For knowledge, the other methods of saving categories are : - copy the xnview.db file, and - "File's categories >Export" from the top menu of the categories panel).

I'm pretty sure the next version will fix the bugs, Pierre is already working on it.
User avatar
OnkelTom
Posts: 21
Joined: Thu Jun 09, 2022 3:40 pm

Re: Exporting Categories to IPTC Keywords does not work

Post by OnkelTom »

If IPTC keywords are not useful to you, you can ignore them for the moment.
For me, it is "the other way round". I am relying on IPTC, but I am not (so) familiar with XMP, to be honest.

I know, you are an expert in this and the handling with XnView, but I am just a novice/beginner.

The planned tagging of my complete photo history will be a huge, huge project for years and I am currently "playing around" with just 2 years... out of about 20... The files are all on quite an old Syno NAS, which is slooooow in indexing and re-creating thumbs.

I found, that the so called photo-station (program) obviously prefers XMP:dc section over the IPTC section.
Good to know that
The xmp-lr:hierarchical don't bother, and they are a backup in case you have to rebuild the category database (the catalog).
I decided to use hierarchical keywords like "person|smith alexander" or "location|france|paris", in order to sort this a little bit and to find the keywords afterwards. Problem is, that XnViewMP writes these hierarchical keywords into IPTC, but in XMP:dc I just find the last stage of the hierarchie like e.g. "smith alexander" or "paris", based on above examples.

As the NAS's photo-station program prefers the XMP:dc section over IPTC, this makes my hierarchie obsolete.
Currently, I am tagging IPTC (which creates the non-hierarchical XMP:dc section - what we know is a bug) and then deleting XMP metadata, which leaves just IPTC... :(

But like I said, the NAS is weak and this double tagging takes ages for e.g. 150 pics in one folder...
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Exporting Categories to IPTC Keywords does not work

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.01. Please check and confirm the bug fix here.
Pierre.
Gwenael Q.
Posts: 309
Joined: Mon Apr 06, 2020 2:06 am
Location: Martinique

Re: Exporting Categories to IPTC Keywords does not work

Post by Gwenael Q. »

Hello,

Testing XnviewMP 1.3,

"View > update file from catalog" is able to export sucessfully keywords to IPTC. Issue seems fixed

Please note that information panel won't update automatically whereas it does so when deleting IPTC with Tool > metadata > Clean. Automatic update would be welcome


Thanks for the work.
Post Reply