Renaming/moving categories

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

Moderators: helmut, XnTriq, xnview

Post Reply
mkc73
Posts: 51
Joined: Thu Jun 15, 2023 7:09 am

Renaming/moving categories

Post by mkc73 »

xnview "seems" to cope well with renaming or moving categories on the fly. However, the documentation suggests care is needed and renaming/moving should only be done with empty categories. What could possibly go wrong?
User avatar
xnview
Author of XnView
Posts: 46271
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Renaming/moving categories

Post by xnview »

where do you see that?
Pierre.
mkc73
Posts: 51
Joined: Thu Jun 15, 2023 7:09 am

Re: Renaming/moving categories

Post by mkc73 »

Hi Pierre

Thanks for your response. Found in https://orchisere.fr/logiciels/html/xnviewmpintro.htm
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Renaming/moving categories

Post by michel038 »

1) When a category is moved, previous parent category and new parent category wont be updated in db.
Parent keywords wont be updated neither, even if "export" options are enabled.

Example:

Fruit (8)
Fruit > Orange (5)
Fruit > Apple (3)

Color (2)
Color > Blue (2)

When moving category Orange to Color, you will get :

Fruit (8)
Fruit > Apple (3)

Color (2)
Color > Blue (2)
Color > Orange (5)

And the five photos having "Orange" have kept their parent category "Fruit"

2) Rename
A photo has a category "cherry", and, when assigned, iptc and xmp keywords have been written in metadata.
-Rename the category "strawberry"
The photo has now "strawberry" as a category, and "cherry" as keywords.

Keywords are updated only when
- export options are set
- photos are selected
- a checkmark is set in the category panel
- selection is released
mkc73
Posts: 51
Joined: Thu Jun 15, 2023 7:09 am

Re: Renaming/moving categories

Post by mkc73 »

Hi Pierre,

Thanks for your reply.

<<<
1) When a category is moved, previous parent category and new parent category wont be updated in db.
Parent keywords wont be updated neither, even if "export" options are enabled.
>>>

I did wonder how confusion between the catalog and the metadata is avoided when category is moved to a different parent. If I understand you correctly, your answer seems to be that the category is not moved to a different parent at all but just appears to be moved in the category pane - so it is just a cosmetic difference and not the equivalent of creating a new subcategory with that name.

<<<
2) Rename [Category]
>>>

If my understanding is correct - catalog and metadata are out of sync until any category for that image is updated (ie image selected, category deassigned, category reassigned, image deselected for instance) - or presumably "View/update files from catalog" used ?
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Renaming/moving categories

Post by michel038 »

1) move category
I did wonder how confusion between the catalog and the metadata is avoided when category is moved to a different parent. If I understand you correctly, your answer seems to be that the category is not moved to a different parent at all but just appears to be moved in the category pane - so it is just a cosmetic difference and not the equivalent of creating a new subcategory with that name.
Yes; that seems right for photos that were already categorized. But if you assign the category "Orange" to a new photo, it will get the right keywords (xmp hierarchical : Color , Color|Orange , iptc keywords : Color, Orange)
( if Settings>Metadata>Automatically apply parent keywords is checked)
As in case 2, "View/update files from catalog" will do the job, but it's sometimes difficult to find photos that need to be updated if they have lost parent categories.

2) rename category
f my understanding is correct - catalog and metadata are out of sync until any category for that image is updated (ie image selected, category deassigned, category reassigned, image deselected for instance) - or presumably "View/update files from catalog" used ?
Yes

It's important to me that categories and keywords stay in sync.


And for people who don't want to add metadata to files (or for files that don't support metadata), it's important to make backup copies of the xnview.db file, or use "File's categories >Export" from the categories panel.
mkc73
Posts: 51
Joined: Thu Jun 15, 2023 7:09 am

Re: Renaming/moving categories

Post by mkc73 »

<<<
Yes; that seems right for photos that were already categorized. But if you assign the category "Orange" to a new photo, it will get the right keywords
>>>

So, sounds like can still get in a tangle. If I assign a category to a subset of images and update keywords in files, then move the category and assign to a different subset of images and update the keywords in the files; then delete the database and recreate catalog from the image files I will have two different categories. So would have to manually move images categorized by the first to the second category and delete the first category if I wanted to keep things clean (or only move empty categories).
mkc73
Posts: 51
Joined: Thu Jun 15, 2023 7:09 am

Re: Renaming/moving categories

Post by mkc73 »

Does any of this relate to the symptoms I am still experiencing where xnview won't export a category to the XMP data for an image but does when close down xnview and restart ? Is there some combination of renaming moving categories (which happens quite often by mistake) that could put xnview in such a state? Perhaps moving category to different place in hierarchy, moving it back, moving it again, putting it back. How would the software handle mutliple moves - doesn't it have to keep track of old hierarchy position for files that have previously had that keyword written to XMP data as well as new hierarchy position for files that have yet to have that keyword written out?
Post Reply