Making sense of choices at Metadata > Edit XMP(IPTC) > Options. Or maybe a bug?

Ask for help and post your question on how to use XnView MP.

Moderator: xnview

KLE-France
Posts: 147
Joined: Mon Jan 14, 2019 3:00 pm

Making sense of choices at Metadata > Edit XMP(IPTC) > Options. Or maybe a bug?

Post by KLE-France »

I'm not sure if the following is a bug or me not understanding something, so I'll start here in General Support.

When modifying XMP or IPTC data on multiple images at once, the "Options" tab has three choices:

Keep and add new value (Keywords [and supplemental categories])

Keep original value if new value is empty

Replace only if original value is empty

The following concerns only the last two.

Here's what's happening to me:

Select multiple images that have star ratings in them > Metadata > Edit XMP > ("Don't load field values" is checked) > Options tab:

"Keep and add new value (Keywords)" is checked

"Keep original value if new value is empty" is checked

"Replace only if original value is empty" is unchecked (because I want to change an existing value)

> Description tab > put new value in "Author" > Click "Write to all files"

⇒ This erases my star ratings.

When "Replace only if original value is empty" is checked, the star ratings do not change.

But this doesn't make sense to me. I am NOT putting a new value into the star rating, so this latter should be considered to have an "empty" new value. Thus, it seems to me, that a checked "Keep original value if new value is empty" should protect the star ratings...

But that's not what happens.

In this case at least, XnView seems to consider the default rating of no stars NOT as an "empty" value but as a rating of zero stars. This would explain why having an unchecked "Replace only if original value is empty" lets XnView change the star rating, but having it checked doesn't.

Donc, am I simply daft? Is this a bug? Or is this just something we need to live with?

Thanks in advance to all!
User avatar
xnview
Author of XnView
Posts: 48075
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Making sense of choices at Metadata > Edit XMP(IPTC) > Options. Or maybe a bug?

Post by xnview »

do you have the problem only with rating?
Pierre.
KLE-France
Posts: 147
Joined: Mon Jan 14, 2019 3:00 pm

Re: Making sense of choices at Metadata > Edit XMP(IPTC) > Options. Or maybe a bug?

Post by KLE-France »

I'll see if I can test that.

In my metadata work, I only use author, copyright notice, keywords and ratings. So, no, I haven't seen it elsewhere, but I can make a test folder.

More info coming soon then.
KLE-France
Posts: 147
Joined: Mon Jan 14, 2019 3:00 pm

Re: Making sense of choices at Metadata > Edit XMP(IPTC) > Options. Or maybe a bug?

Post by KLE-France »

KLE-France wrote: Wed Jul 15, 2026 7:28 am More info coming soon then.
Allez ! No time like the present, no present like time.

TLDR: This appears to affect only the star rating.

So, what I did was to collect a sample of images from different cameras, all with ratings, and put them in a separate folder.

I then picked two, and filled every box in every tab of the Edit XMP interface with a sample text and wrote that data into those two files.

I then selected all of the images, opened them in Edit XMP, made sure that all three options ("Keep and add new value (Keywords)", "Keep original value if new value is empty", "Replace only if original value is empty") were checked, changed the author name and clicked "Write to all files." As expected, this did nothing to any of the files; "Replace only if original value is empty" played its role as a protector of current information. All files had all their "entrance" information, including the two files filled with sample text.

I then selected all of the images again and opened them again in Edit XMP. This time, I left "Keep and add new value (Keywords)" and "Keep original value if new value is empty" checked, but I unchecked "Replace only if original value is empty". Bis repetita, I changed the author name and clicked "Write to all files". This, as before, made my star ratings disappear (rather, I think, it re-wrote all files to no stars). However, no other fields, including in the two images completely filled with sample texts, were affected. So, everyone lost their stars, but no one lost any other information.

I did the above as well with Edit IPTC. IPTC doesn't carry ratings, but I did want to see if there were fields therein suffering from the same thing. There were none, as far as I can determine.

Hope that helps et bonne journée !