-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exiv2 does not register certain namespaces present in an image #2932
Comments
Same on Linux using 0.28.2: $ ./a.out PXL_20231220_182442817.jpg
Testing exiv2 namespace info (exiv2 version 0.28.2)
Container namespace: 'http://ns.google.com/photos/1.0/container/'.
Exiv2 exception: 'No namespace info available for XMP prefix `Item' Still trying to understand the issue though. It do seam to dump the namespace/container info properly (?): $ exiv2 -PX ./PXL_20231220_182442817.jpg
Xmp.hdrgm.Version XmpText 3 1.0
Xmp.xmpNote.HasExtendedXMP XmpText 32 9AABF2DA602006640FE14B0C857436F3
Xmp.Container.Directory XmpText 0 type="Seq"
Xmp.Container.Directory[1] XmpText 0 type="Struct"
Xmp.Container.Directory[1]/Container:Item XmpText 0 type="Struct"
Xmp.Container.Directory[1]/Container:Item/Item:Mime XmpText 10 image/jpeg
Xmp.Container.Directory[1]/Container:Item/Item:Semantic XmpText 7 Primary
Xmp.Container.Directory[2] XmpText 0 type="Struct"
Xmp.Container.Directory[2]/Container:Item XmpText 0 type="Struct"
Xmp.Container.Directory[2]/Container:Item/Item:Mime XmpText 10 image/jpeg
Xmp.Container.Directory[2]/Container:Item/Item:Semantic XmpText 7 GainMap
Xmp.Container.Directory[2]/Container:Item/Item:Length XmpText 6 207318 Result of <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="" xmlns:hdrgm="http://ns.adobe.com/hdr-gain-map/1.0/" xmlns:xmpNote="http://ns.adobe.com/xmp/note/" xmlns:Container="http://ns.google.com/photos/1.0/container/" xmlns:Item="http://ns.google.com/photos/1.0/container/item/" hdrgm:Version="1.0" xmpNote:HasExtendedXMP="9AABF2DA602006640FE14B0C857436F3">
<Container:Directory>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<Container:Item Item:Mime="image/jpeg" Item:Semantic="Primary"/>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<Container:Item Item:Mime="image/jpeg" Item:Semantic="GainMap" Item:Length="207318"/>
</rdf:li>
</rdf:Seq>
</Container:Directory>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta> Also, the list of registered Exiv2::Dictionary ns_dict;
Exiv2::XmpProperties::registeredNamespaces(ns_dict);
for (auto const& entry : ns_dict)
{
std::cout << entry.first << ": " << entry.second << std::endl;
}
It would seem, that But despite everything, accessing by explicit key works: $ exiv2 -K "Xmp.Container.Directory[1]/Container:Item" ./PXL_20231220_182442817.jpg
Xmp.Container.Directory[1]/Container:Item XmpText 0 type="Struct" o_0 |
Describe the bug
Certain xmp namespaces that we know are present in an image, do not get registered. When trying to retrieve the namespace it throws "No namespace info available for XMP prefix `Item'".
This is known to happen with:
Item
- namespacehttp://ns.google.com/photos/1.0/container/item/
(see GIMP issue https://gitlab.gnome.org/GNOME/gimp/-/issues/10557.apple-fi
To Reproduce
Steps to reproduce the behavior:
Use the image from the above linked GIMP issue: https://shallowsky.com/tmp/PXL_20231220_182442817.jpg Note only the direct link works since Gitlab removes most metadata.
Build and run the supplied sample program on the above image. (attaching a zip doesn't seem to work, so replaced cpp with txt)
test-namespace.txt
Tested on Windows 10 Home, 64-bit using:
MINGW64:
UCRT64:
Expected behavior
I expect it to return the namespace for the
Item
prefix just like it does forContainer
.Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: