Decoding the image-data from a notification
Thomas Kluyver
thomas at kluyver.me.uk
Thu Oct 19 08:00:32 UTC 2023
Hi Chandler,
On Wed, 18 Oct 2023, at 15:40, chandler wrote:
> Prior to posting here, I did find the below code1 <#1> on Github, but still couldn't get that working even for new incoming notifications. It looks pretty complicated and I don't see any mention of Pillow, so maybe some updated code could work better. I have the output fromdbus-monitor "interface='org.freedesktop.Notifications'" saved in the journal and right now there is one particular entry that I need to get decoded.
I can't write this for you, but I think the script in that issue is watching for new notifications, not reading the saved data you want. The save_img_byte() function in there is probably what you need if you can get the right arguments into it.
If it's just one specific entry you need, it's probably simplest to manually copy and paste the values from your saved data. You can use bytes.fromhex() to convert the hex encoded data back to binary.
Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20231019/7efa683f/attachment.htm>
More information about the dbus
mailing list