XMP search custom namespace question

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
apixel
Posts: 5
Joined: Sun Apr 30, 2023 10:57 pm

XMP search custom namespace question

Post by apixel »

If the image has a custom namespace can XnView 1.5.3 search on those fields?

I have tried (number field)

a.b.c score > 10.0

However I get no results when examining the images with XnView->Properties-> XMP there are fields a.b.c with a score value > 10.0 which indicates XnView is reading the metadata. What am I doing wrong with search?

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

Re: XMP search custom namespace question

Post by xnview »

do you have a sample file?
Pierre.
apixel
Posts: 5
Joined: Sun Apr 30, 2023 10:57 pm

Re: XMP search custom namespace question

Post by apixel »

  • Please find a test image without and with XMP data, along with screens shots of the search input and result.
  • The search value box for numbers only allows a single digit after the decimal point, could that field size be increased to support 6 digits after the decimal place?

Python exampleto add Xmp data to a jpg
==

Code: Select all

import pyexiv2
img = pyexiv2.Image('xmptest.jpg')
xmp = img.read_xmp()
print(xmp)
pyexiv2.registerNs('abc', 'abc')
img.modify_xmp({ 'Xmp.abc.valstring': 'xnviewtest',
                 'Xmp.abc.valfloat': 1.234,
                 'Xmp.abc.valint': 434})
img.close()

# --
img = pyexiv2.Image('xmptest.jpg')
xmp = img.read_xmp()
print(xmp)
Attachments
noxmp
noxmp
xmptest_noxmp.jpg (78.45 KiB) Viewed 6577 times
xmp data included
xmp data included
xmptest.jpg (80.81 KiB) Viewed 6577 times
query #2 result
query #2 result
20230902111418990.jpg (13.25 KiB) Viewed 6577 times
query #2 search for files with xmp values ..
query #2 search for files with xmp values ..
20230902111410374.jpg (29.3 KiB) Viewed 6577 times
query #1 result
query #1 result
20230902111336994.jpg (18.1 KiB) Viewed 6577 times
query #1 search for files
query #1 search for files
20230902111328463.jpg (25.8 KiB) Viewed 6577 times
xmp properties display
xmp properties display
20230902111025658.jpg (12.96 KiB) Viewed 6577 times
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XMP search custom namespace question

Post by xnview »

you must search for 'abc:valfloat'
Pierre.
Post Reply