Replies: 3 comments 3 replies
|
I'm on holiday at the moment, so can't give you a properly researched answer. I think libexiv2 has a function/method to extract the XMP packet, which might have those options. Then you could write the packet to a file with normal Python file handling. |
2 replies
|
I was able to read in the xmp with the image loading code path, so I
shouldn't need decode. If you figured out a clean way to get encode bound
it would be a nice companion though, for encoding and decoding directly
from strings instead of files. If the encode/decode stuff just doesn't map
well to Python though I understand if you don't want to add something hacky
to the library.
…On Thu, Jul 23, 2026, 11:38 AM Jim Easterbrook ***@***.***> wrote:
Looking at the libexiv2 API I think Exiv2::XmpParser::encode (
https://exiv2.org/doc/classExiv2_1_1XmpParser.html#afad88c80404f9f35b687b33fe9ea9c63)
might be what you want. This is currently not included in the Python
interface - I didn't think it was needed and its interface does not appear
to be easily adapted to Python.
I'll have a go at making a Python interface to this function. Do you need
the decode function as well?
—
Reply to this email directly, view it on GitHub
<#66?email_source=notifications&email_token=AAEEVVERIWLHHV33ZJ6Z2MT5GI5RBA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGU2DEMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-17754204>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEEVVEGNBGQQENRA6ZJU5D5GI5RBAVCNFSNUABIKJSXA33TNF2G64TZHMZTSNRSG44TKNBSHNCGS43DOVZXG2LPNY5TCMBUGQ4TENBVUF3AE>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAEEVVBNHSTFXAECLI5ZWMT5GI5RBA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGU2DEMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/AAEEVVDBHPV6NSGRFPOOEW35GI5RBA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGU2DEMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
1 reply
|
Hey Jim, I just got back to this today and saw you rolled out a new version with this change. I just finished testing it and it worked great, thank you! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm working with XMP sidecar files, and I'm trying to match the formatting from another application that uses exiv2. I've figured out how to read in the xmp file and view/modify the data, but I want to be able to pass options on write (specifically omitPacketWrapper and useCompactFormat). I see those values are in the bindings, but I assume it's just something swig brought over automatically vs having a purpose. Looking at the code, Exiv2::XmpParser::encode is being ignored for binding, and it's what the application is using.
Is there any other way to pass options for how to write the xmp?
All reactions