Searching based on XMP fields
Moderators: XnTriq, helmut, xnview, Dreamer
Searching based on XMP fields
Hi there-
We have some images taken underwater using a novel scientific instrument. I have used python to embed XMP information directly into the .png files, the XMP fields include numerical fields such as depth, temperature, salinity. I like that XnView MP allows me to view the XMP data that I have created, most other tools do not.
Under Tools->Search (ctrl+F), there is a dialog box that allows me to search/filter based on specific fields. This includes an option for XMP fields by using the "Add>>" button, then creating a condition for XMP: All Fields. When I enter an exact numerical value, such as "13.20", it works, and I can find all images that have a value of "13.20" in the XMP temperature field that I have created. So I know I am properly embedding the XMP in a format that XnView MP can currently understand. However, the only option for XMP searching is currently a text field, where the default value is "XMP: All Fields _is_ ___________" where I can choose "_is_", "_is_not_", "_contains_", etc. If I choose instead to search on the 'Add>> File size' condition, I can choose "_is_less_than_", "_between_" etc. I would really like to be able to have that logic for XMP searching.
Also, there are some options under "Add>>XMP>" that are pre-populated with values that I did not choose, these include
'Creator', 'Description', 'Copyright', 'Subject', 'Title', etc. I have many XMP fields, and I only really want to be searching on a single field. Even if it is too hard for those to be loaded dynamically from all the XMP information from each individual image, would it be possible to have a .ini or .conf file where I could specify the names of my XMP fields (such as Temp_deg_C or Pressure_dbar)? I think then search speed might be improved, because I have over 50 different XMP fields. So this would make things even easier. This file could specify whether or not it was a numerical field, and even the label. My images will always have the same fields, so I am not concerned about the field names changing from one field to the next.
Similarly, under view->sort by, there is a list of about 20 options including name, file size, modification date, etc. There is also an option for 'Custom' (at the bottom, just above 'ascending' and 'descending'). I can not figure out how or where the parameters for this 'custom' sort are accessed or changed, but that also might be very useful, if it could be applied to the XMP fields.
Any of these would be pretty useful for our lab, at a University. We would donate some amount if these worked well. I think they would be pretty easy, because most of the logic already works, and there would be no significant user interface changes.
Thanks!
We have some images taken underwater using a novel scientific instrument. I have used python to embed XMP information directly into the .png files, the XMP fields include numerical fields such as depth, temperature, salinity. I like that XnView MP allows me to view the XMP data that I have created, most other tools do not.
Under Tools->Search (ctrl+F), there is a dialog box that allows me to search/filter based on specific fields. This includes an option for XMP fields by using the "Add>>" button, then creating a condition for XMP: All Fields. When I enter an exact numerical value, such as "13.20", it works, and I can find all images that have a value of "13.20" in the XMP temperature field that I have created. So I know I am properly embedding the XMP in a format that XnView MP can currently understand. However, the only option for XMP searching is currently a text field, where the default value is "XMP: All Fields _is_ ___________" where I can choose "_is_", "_is_not_", "_contains_", etc. If I choose instead to search on the 'Add>> File size' condition, I can choose "_is_less_than_", "_between_" etc. I would really like to be able to have that logic for XMP searching.
Also, there are some options under "Add>>XMP>" that are pre-populated with values that I did not choose, these include
'Creator', 'Description', 'Copyright', 'Subject', 'Title', etc. I have many XMP fields, and I only really want to be searching on a single field. Even if it is too hard for those to be loaded dynamically from all the XMP information from each individual image, would it be possible to have a .ini or .conf file where I could specify the names of my XMP fields (such as Temp_deg_C or Pressure_dbar)? I think then search speed might be improved, because I have over 50 different XMP fields. So this would make things even easier. This file could specify whether or not it was a numerical field, and even the label. My images will always have the same fields, so I am not concerned about the field names changing from one field to the next.
Similarly, under view->sort by, there is a list of about 20 options including name, file size, modification date, etc. There is also an option for 'Custom' (at the bottom, just above 'ascending' and 'descending'). I can not figure out how or where the parameters for this 'custom' sort are accessed or changed, but that also might be very useful, if it could be applied to the XMP fields.
Any of these would be pretty useful for our lab, at a University. We would donate some amount if these worked well. I think they would be pretty easy, because most of the logic already works, and there would be no significant user interface changes.
Thanks!
Re: Searching based on XMP fields
Hi there-
I sent email to the contact email address. Please let me know if you need it resent, or more examples.
Thanks!
I sent email to the contact email address. Please let me know if you need it resent, or more examples.
Thanks!
Re: Searching based on XMP fields
ok, thanks, i understand your problem. Currently only text filed can be search in XMP fields.
I'll add the possibility to use number in XMP, and the name of field
I'll add the possibility to use number in XMP, and the name of field
Pierre.
Re: Searching based on XMP fields
I used DB Browser, and I saw only iptc metadata in xnview.db ... (except , perhaps, rating and color labels.)
Pierre, are there some xmp metadata in this database ? (xmp:subject ?)
Or will you add possibility for xmp metadata to be present in future xnviewmp database ?
Pierre, are there some xmp metadata in this database ? (xmp:subject ?)
Or will you add possibility for xmp metadata to be present in future xnviewmp database ?
Last edited by michel038 on Thu Jan 25, 2018 11:23 pm, edited 2 times in total.
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Re: Searching based on XMP fields
Thanks, being able to search on those fields would be great.
My other question was about the 'View->Sort By->Custom' option. What does it do? Where can I configure it? I'm not sure if it could easily work with our XMP, because right now I can't see how to make it do anything, even for non-XMP data.
Thanks!
My other question was about the 'View->Sort By->Custom' option. What does it do? Where can I configure it? I'm not sure if it could easily work with our XMP, because right now I can't see how to make it do anything, even for non-XMP data.
Thanks!
Re: Searching based on XMP fields
You can drag thumbnails, to rearrange them in the main screen of the browser.
A .XnViewSort file is created, which contains the new order of images for display.
A .XnViewSort file is created, which contains the new order of images for display.
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Re: Searching based on XMP fields
currently for XMP search, file header is readedmichel038 wrote:I used DB Browser, and I saw only iptc metadata in xnview.db ... (except , perhaps, rating and color labels.)
Pierre, are there some xmp metadata in this database ? (xmp:subject ?)
Or will you add possibility for xmp metadata to be present in future xnviewmp database ?
Pierre.
Re: Searching based on XMP fields
Ok, I think I understand. It's a memorized, custom ordering of those exact images. Not a custom criteria used for sorting. Thanks.michel038 wrote:You can drag thumbnails, to rearrange them in the main screen of the browser.
A .XnViewSort file is created, which contains the new order of images for display.
Re: Searching based on XMP fields
This problem is supposed to be fixed in XnView MP 0.90. Please check and confirm the bug fix here.
Pierre.
Re: Searching based on XMP fields
Hi there-
I was at a conference, so I am just getting back to check on this now. For the first few small folders that I tried it on, I confirmed that the new search criteria do work. I was able to type in the name of an XMP field of my own, and perform both a numerical (less than, etc) and a string match query to subselect. So I can verify that the search feature works on our XMP fields. I understand it's a non-trivial search, so I can see it takes a little time. I'll have to try it out on some larger folders. But so far so good.
I do not see any way to sort on any of these criteria. Is that correct? But being able to filter is a great start.
Thanks,
-Jeff
I was at a conference, so I am just getting back to check on this now. For the first few small folders that I tried it on, I confirmed that the new search criteria do work. I was able to type in the name of an XMP field of my own, and perform both a numerical (less than, etc) and a string match query to subselect. So I can verify that the search feature works on our XMP fields. I understand it's a non-trivial search, so I can see it takes a little time. I'll have to try it out on some larger folders. But so far so good.
I do not see any way to sort on any of these criteria. Is that correct? But being able to filter is a great start.
Thanks,
-Jeff