Searching based on XMP fields

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, xnview, Dreamer

Post Reply
jellen
Posts: 6
Joined: Thu Jan 18, 2018 9:49 pm

Searching based on XMP fields

Post by jellen » Thu Jan 18, 2018 10:16 pm

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!

User avatar
xnview
Author of XnView
Posts: 29272
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Searching based on XMP fields

Post by xnview » Mon Jan 22, 2018 11:34 am

could you send me a file with the embeded XMP fields?
Pierre.

jellen
Posts: 6
Joined: Thu Jan 18, 2018 9:49 pm

Re: Searching based on XMP fields

Post by jellen » Wed Jan 24, 2018 11:39 pm

Hi there-

I sent email to the contact email address. Please let me know if you need it resent, or more examples.

Thanks!

User avatar
xnview
Author of XnView
Posts: 29272
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Searching based on XMP fields

Post by xnview » Thu Jan 25, 2018 3:45 pm

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
Pierre.

michel038
Posts: 166
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Searching based on XMP fields

Post by michel038 » Thu Jan 25, 2018 7:36 pm

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 ?
Last edited by michel038 on Thu Jan 25, 2018 11:23 pm, edited 2 times in total.

jellen
Posts: 6
Joined: Thu Jan 18, 2018 9:49 pm

Re: Searching based on XMP fields

Post by jellen » Thu Jan 25, 2018 9:46 pm

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!

michel038
Posts: 166
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Searching based on XMP fields

Post by michel038 » Thu Jan 25, 2018 11:21 pm

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.

User avatar
xnview
Author of XnView
Posts: 29272
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Searching based on XMP fields

Post by xnview » Fri Jan 26, 2018 6:28 am

michel038 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 ?
currently for XMP search, file header is readed
Pierre.

jellen
Posts: 6
Joined: Thu Jan 18, 2018 9:49 pm

Re: Searching based on XMP fields

Post by jellen » Sat Jan 27, 2018 12:31 am

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.
Ok, I think I understand. It's a memorized, custom ordering of those exact images. Not a custom criteria used for sorting. Thanks.

User avatar
xnview
Author of XnView
Posts: 29272
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Searching based on XMP fields

Post by xnview » Mon Feb 12, 2018 10:12 am

This problem is supposed to be fixed in XnView MP 0.90. Please check and confirm the bug fix here.
Pierre.

jellen
Posts: 6
Joined: Thu Jan 18, 2018 9:49 pm

Re: Searching based on XMP fields

Post by jellen » Mon Feb 26, 2018 10:22 pm

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

Post Reply