Decoding the image-data from a notification

Thomas Kluyver thomas at kluyver.me.uk
Thu Sep 28 07:24:41 UTC 2023


Hi Chandler,

On Thu, 28 Sep 2023, at 07:32, chandler wrote:
> I've had `dbus-monitor "interface='org.freedesktop.Notifications'"`
> running as a service, so the data from notifications is saved in the
> journal.  How could I turn the `image-data` array of bytes back into an
> image?

The notifications spec has details of the data format for images being sent:
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#icons-and-images

It should be possible to reconstruct an image from that, using something like the Pillow library in Python, and then save it to any format you choose.

Best wishes,
Thomas


More information about the dbus mailing list