Decoding the image-data from a notification
chandler
scar at riseup.net
Thu Nov 2 19:13:13 UTC 2023
Thomas Kluyver wrote on 10/19/23 1:00 AM:
> 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.
Figured it out finally!
After taking the hex data from the `array of bytes []` and putting it
all on one line (keeping the spaces between each character/byte), was
able to get an image with this python code:
import sys
from PIL import Image
hexstring = "00 00 [...] 00 00"
img = Image.frombytes("RGBA", (X, Y), bytes.fromhex(hexstring))
img.save("output.png")
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20231102/674e7062/attachment.htm>
More information about the dbus
mailing list