Re: Decoding the image-data from a notification

"Thomas Kluyver" <[email protected]> Thu, 28 Sep 2023 08:24:41 +0100
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
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