Categories, Color Coding saved to Image to use on MacOS and Win10

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

Moderators: XnTriq, helmut, xnview

User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

We can see a "base path" in your screenshot .
I suggest to let the default value for "Base path" field : \
This "Base path" is very difficult to use correctly ...

We can also see Z:'
One might expect to find Z:/something
In my own xml file, there are only double quotes, no single quote ... did you do this task on your Mac ?
I can find this kind of records :
<File filename="I:/photos/2023/test01/doubleloop.jpg" rating="5">
<Keywords>Object</Keywords>
</File>

Then "Delete all" the catalog, and import again your updated xml file...
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

Importing the categories seems to be even slower than just moving the photos back to the original path location. I just canceled the import operation after waiting about 7 hours, removed the basepath, cleared all categories and started importing again. There is no Z:'. It's Z:\.. but I blackened the full path. It fills in the basepath Z:\.. (backslash) instead of Z:/.. (slash) when selecting the folder via XnView. In the .xml file though it is Z:/.. (backslash) and only doublequotes in the following Format:

<?xml version="1.0" encoding="UTF-8"?><XnView_Catalog version="1.0">
<FileList>
<File filename="Z:/../photoname.png">
<Keywords>Object</Keywords>
</File>
...
Last edited by hugo on Mon Jan 29, 2024 10:28 pm, edited 1 time in total.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

I imported a DB for 68000 photos in about 15 min ...
It's not a strong PC but my xml file was in a SSD local drive

The xml import export must contain paths with slashes / even if the PC is running Windows.
When the import is done, the internal work in XnViewMP on Windows seems to convert paths and use backslashes
... I'm not sure I understood your last post correctly

At the beginning of this thread, I thought the operation would take less than 20 minutes in total .. With computing there are always unforeseen circumstances.
:|
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

As far as I am understanding this, I'm not importing a DB, but only the .xml for creating the DB file. In fact my .db on Win10 is a much bigger file than the .xml file (305336kb > 7129kb). I am importing the .xml file from my computers internal Harddrive (C:/). The Program Xnview runs on my internal Harddrive (C:/) so the DB needs to be created on my internal Harddrive (C:/) aswell, but the Photos and their informations are saved on the network drive (Z:/). Xnview should create a DB file connecting the categories information from the new .xml file to the photos, but my upspeed to the network drive (Z:/) is a very slow 1,1Mb/s at the moment. As I said in the beginning, in my case I think it's better if the categories information is saved in the photo itself so there is no dependency to the DB. I am now importing the new .xml file again and I'll wait for some hours, hoping that I can use the Update files from catalog function after finishing the import to achieve this. If this doesn't work, I guess I'll transfer all photos to the internal harddrive and start importing the .xml file then. I tried importing it on MacOS aswell. I deleted all entries in the catalog and basepath section, cleared all categories but I couldnt even find the .db file to delete it so when importing the .xml file, there was again no loading time at all, and no categories were added.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

Everything you have just said is absolutely true...
I'm much less familiar with Mac OS
I'm out of ideas

französischer Ausdruck "Ich gebe meine Zunge für die Katze" :mrgreen: this means I don't have the answer
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

After waiting abound 12h Xnview stopped the importing process but now only abound 1/6 of the category info was imported. I guess this is due to the slow connection to the network drive.

Here is my update from 31.01.24. I now saved my Photos to an external harddrive (D:/) with much quicker datarate. Next, I changed the .xml file in order to direct to this harddrive (D:/). When importing the new .xml file via Categories > File's Categories > Import, XnViewMP proceeds some seconds and afterwards one category with one photo assigned to it got imported. Same result on MacOS. Unfortunately, I do not have enough diskspace on my internal harddrive (C:/) to save the whole library in C:/ location. I tested if it works by copying half of the library to C:/, changed the .xml file to direct to C:/, imported the new .xml file again and got the same unsatisfactory result as described above. Could there be an Error in the .xml file? All the necessary information is written in over 110000 lines of code formatted as mentioned before, but apparently XnviewMP can't use this file correctly. I could use this .xml file as a template to assign each Keyword to each photo manually again. This would take long time and it seems laborious. Lastly, I used the .db backup file from before and placed it in the XnViewMP Program Folder. Now the photos can be found in the category-filter-section and the photo-information is sometimes available, sometimes not, no preview, no thumbnails and not the photo itself. In the properties I can see that it's the right filepath, but the file size is always 0 Bytes.
Last edited by hugo on Thu Feb 01, 2024 11:05 am, edited 1 time in total.
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

I changed the path to the network drive and imported the new .xml file again. After waiting some time, finally all categories got imported correctly. Now i was able to use the update files from catalog function. Now where is the information being stored in the photo? I cannot find it being assigned to it in the XMP, EXIF or Properties panel. Also, is it possible to assign two categories? Now that the categories filter work again, I guess I could also just select all photos from each category and batch edit the comment by adding the category name as a description if the update from files from catalog function does not work properly in this case.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

I changed the path to the network drive and imported the new .xml file again. After waiting some time, finally all categories got imported correctly.
8) Yeah
Now , the post I mentioned first should be useful ... viewtopic.php?p=179720#p179720
Now i was able to use the update files from catalog function
To be sure that this step works, you first need to validate the import export options, select a batch of images, and "update files from catalog".
Now where is the information being stored in the photo? I cannot find it being assigned to it in the XMP, EXIF or Properties panel.
Select a photo, in Info panel IPTC tab, categories should have been converted into keywords.
Same in XMP tab, categories are saved as dc:subject() and lr:hierarchicalkeywords()
Also, is it possible to assign two categories?
Yes, sure....
First of all, make sure that the "Export... " options are enabled.
The best way: select the photos, tick a box in the "Categories" panel, deselect the photos.
The keywords are automatically written to the photos when the selection is released.
Check that the new categories are added as IPTC and/or XMP keywords.
Now that the categories filter work again, I guess I could also just select all photos from each category and batch edit the comment by adding the category name as a description if the update from files from catalog function does not work properly in this case.
Yes, but you should no longer need to use update from files from catalog , as keywords are automatically added.
I'm pleased to see that you've worked hard to resolve these difficulties... Users often disappear after a few questions
Last edited by michel038 on Thu Feb 01, 2024 2:13 pm, edited 4 times in total.
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

Thanks again for the response! I only see the XMP Information at the moment, not the IPTC. My Tools > Settings > Metadata Konfiguration looks like this.
xnview_support_10.PNG
I tested the update files from catalog function on one photo, and now I can find the Category Information as dc: and lr: in the XMP Panel. Unfortunately, when updating a batch of photos I need to wait very long again due to the slow connection to the network storage. I would prefer continuing on my internal drive or external drive, but as the import of .xml file does not work properly there, I am certain there is a solution to further optimize this process.
You do not have the required permissions to view the files attached to this post.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

Sorry, a mistake in my last post, referesh and see red text.
set Export and iptc and xmp in settings ...

One can choose iptc or xmp.
The cat here on the left thinks that XnViewMP should be updated in order to have
as many possibilities with xmp as with iptc, since xmp is a more recent and more general standard.
In the meantime, I'm continuing to use both standards
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

As described, I used the update files from catalog function on one photo and the Category information was written in the XMP Data, so I know that this already worked with the configuration seen above. Am I understanding correctly that by activating the Export function all photos XMP Data is updated with the category information automatically?
Last edited by hugo on Thu Feb 01, 2024 2:16 pm, edited 1 time in total.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

When xmp info already exists, even if export options are not enabled, xmp metadata can be updated
When iptc info already exists, even if export options are not enabled, iptc metadata can be updated
To be sure iptc and xmp will be created and updated, tick both export options .
You should also tick Export ratings and color labels in xmp metadata
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

Ok, I am not sure if this is what I want to achieve nor if I understand the difference correctly. Updated XMP Metadata is Information assigned to the Photos wich is only available and updatable within XnViewMP, while by creating XMP Data a separate .xmp File is created? A new .xmp file would be a retrogressive step, I already have all the category information summarized in the separate .xml file. At the moment I prefer having less separate files, but the information assigned directly to the matching photo. Also, I would be glad if I the XMP Data is available in each photo so that the category can be read out and found not only within XnViewMP but in the File explorer aswell. On the other hand I need to be satisfied with what is possible witth XnViewMP and prioritize optimizing datarate in the meantime. After one hour the progress bar of the batch (250 photos) is at 50%.
Last edited by hugo on Thu Feb 01, 2024 2:51 pm, edited 1 time in total.
User avatar
michel038
XnThusiast
Posts: 1248
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by michel038 »

For jpg photos, iptc metadata are always embedded.
Xmp metadata are embedded with XnViewMP, or set in a xmp sidecar file only if you enable this in Settings>Metadata>Sidecar dialog.
I suggest not to use xmp files except if you already use them in Adobe photo editors, or if most of your photos are not JPGs

For other formats (raw, cr2, webp ...) , you need to search the Internet to find out whether embedded metadata is supported or not, and, if supported , sometimes XnViewMp is not yet ready to do this.

iptc and xmp are standardised and many software applications recognise them.
For a long time, Microsoft's metadata management was muddled, especially when it came to writing.
For reading, it works quite well, but I don't use Microsoft's methods very much, it annoys me.
hugo
Posts: 17
Joined: Fri Jan 26, 2024 5:20 pm

Re: Categories, Color Coding saved to Image to use on MacOS and Win10

Post by hugo »

Most of my photos are .png files. I do not need this to be metadata, file information is sufficient. Thats why earlier I wrote that maybe now that categories filter work again I can use other methods of assigning the photos to the matching category like EXIF description or even simply adding the category name to the photo name if this prevents the process from being too laborious.
Last edited by hugo on Thu Feb 01, 2024 4:46 pm, edited 1 time in total.