Page 1 of 1

XMP search custom namespace question

Posted: Fri Sep 01, 2023 4:57 pm
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.

Re: XMP search custom namespace question

Posted: Sat Sep 02, 2023 6:04 am
by xnview
do you have a sample file?

Re: XMP search custom namespace question

Posted: Sat Sep 02, 2023 11:21 am
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)

Re: XMP search custom namespace question

Posted: Wed Feb 28, 2024 9:27 am
by xnview
you must search for 'abc:valfloat'