XMP search custom namespace question

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

Moderators: xnview, Dreamer

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: 47528
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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)
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47528
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP search custom namespace question

Post by xnview »

you must search for 'abc:valfloat'
Pierre.