ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": [ "https://www.w3.org/ns/activitystreams", { "ostatus": "http://ostatus.org#", "atomUri": "ostatus:atomUri", "inReplyToAtomUri": "ostatus:inReplyToAtomUri", "conversation": "ostatus:conversation", "sensitive": "as:sensitive", "toot": "http://joinmastodon.org/ns#", "votersCount": "toot:votersCount", "blurhash": "toot:blurhash", "focalPoint": { "@container": "@list", "@id": "toot:focalPoint" }, "Hashtag": "as:Hashtag" } ], "id": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092", "type": "Note", "summary": null, "inReplyTo": null, "published": "2024-06-26T06:27:25Z", "url": "https://mastodon.bsd.cafe/@zirias/112681500370813092", "attributedTo": "https://mastodon.bsd.cafe/users/zirias", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://mastodon.bsd.cafe/users/zirias/followers" ], "sensitive": false, "atomUri": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092", "inReplyToAtomUri": null, "conversation": "tag:bsd.cafe,2024-06-26:objectId=5992240:objectType=Conversation", "content": "<p>Getting closer: I now have a Pixmap class (to hold and render bitmap data, loading it from <a href=\"https://mastodon.bsd.cafe/tags/PNG\" class=\"mention hashtag\" rel=\"tag\">#<span>PNG</span></a> using <a href=\"https://mastodon.bsd.cafe/tags/libpng\" class=\"mention hashtag\" rel=\"tag\">#<span>libpng</span></a>), an ImageLabel widget to display a pixmap, and the first working &quot;real&quot; (using <a href=\"https://mastodon.bsd.cafe/tags/EWMH\" class=\"mention hashtag\" rel=\"tag\">#<span>EWMH</span></a>) dialog window! ๐Ÿฅณ (of course, for testing, an &quot;about box&quot; ๐Ÿ™ˆ)</p><p>libpng was surprisingly easy. Getting bitmap data with an alpha channel in some <a href=\"https://mastodon.bsd.cafe/tags/X11\" class=\"mention hashtag\" rel=\"tag\">#<span>X11</span></a> pixmap was surprisingly hard ๐Ÿง. It seems just uploading it with <a href=\"https://mastodon.bsd.cafe/tags/xcb\" class=\"mention hashtag\" rel=\"tag\">#<span>xcb</span></a> (xcb_image_put) converts the alpha channel to a single bit, making the corners look super ugly ๐Ÿคจ.</p><p>So now, I separate out the alpha channel to upload it to a separate pixmap and then combine that with the rgb-pixmap into an argb-pixmap that&#39;s finally used for rendering, here&#39;s the whole dance:<br /><a href=\"https://github.com/Zirias/xmoji/blob/b7216b5f134985d9daa3f6b6da8315e9b6739440/src/bin/xmoji/pixmap.c#L68\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" translate=\"no\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">github.com/Zirias/xmoji/blob/b</span><span class=\"invisible\">7216b5f134985d9daa3f6b6da8315e9b6739440/src/bin/xmoji/pixmap.c#L68</span></a><br />I *could* save one rendering request by keeping those two pixmaps and render with a mask each time, but didn&#39;t because it will consume more server-side memory...</p><p><a href=\"https://mastodon.bsd.cafe/tags/X11\" class=\"mention hashtag\" rel=\"tag\">#<span>X11</span></a> and <a href=\"https://mastodon.bsd.cafe/tags/XRender\" class=\"mention hashtag\" rel=\"tag\">#<span>XRender</span></a> experts: Do I miss anything, is there a saner way? ๐Ÿค”</p>", "contentMap": { "en": "<p>Getting closer: I now have a Pixmap class (to hold and render bitmap data, loading it from <a href=\"https://mastodon.bsd.cafe/tags/PNG\" class=\"mention hashtag\" rel=\"tag\">#<span>PNG</span></a> using <a href=\"https://mastodon.bsd.cafe/tags/libpng\" class=\"mention hashtag\" rel=\"tag\">#<span>libpng</span></a>), an ImageLabel widget to display a pixmap, and the first working &quot;real&quot; (using <a href=\"https://mastodon.bsd.cafe/tags/EWMH\" class=\"mention hashtag\" rel=\"tag\">#<span>EWMH</span></a>) dialog window! ๐Ÿฅณ (of course, for testing, an &quot;about box&quot; ๐Ÿ™ˆ)</p><p>libpng was surprisingly easy. Getting bitmap data with an alpha channel in some <a href=\"https://mastodon.bsd.cafe/tags/X11\" class=\"mention hashtag\" rel=\"tag\">#<span>X11</span></a> pixmap was surprisingly hard ๐Ÿง. It seems just uploading it with <a href=\"https://mastodon.bsd.cafe/tags/xcb\" class=\"mention hashtag\" rel=\"tag\">#<span>xcb</span></a> (xcb_image_put) converts the alpha channel to a single bit, making the corners look super ugly ๐Ÿคจ.</p><p>So now, I separate out the alpha channel to upload it to a separate pixmap and then combine that with the rgb-pixmap into an argb-pixmap that&#39;s finally used for rendering, here&#39;s the whole dance:<br /><a href=\"https://github.com/Zirias/xmoji/blob/b7216b5f134985d9daa3f6b6da8315e9b6739440/src/bin/xmoji/pixmap.c#L68\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" translate=\"no\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">github.com/Zirias/xmoji/blob/b</span><span class=\"invisible\">7216b5f134985d9daa3f6b6da8315e9b6739440/src/bin/xmoji/pixmap.c#L68</span></a><br />I *could* save one rendering request by keeping those two pixmaps and render with a mask each time, but didn&#39;t because it will consume more server-side memory...</p><p><a href=\"https://mastodon.bsd.cafe/tags/X11\" class=\"mention hashtag\" rel=\"tag\">#<span>X11</span></a> and <a href=\"https://mastodon.bsd.cafe/tags/XRender\" class=\"mention hashtag\" rel=\"tag\">#<span>XRender</span></a> experts: Do I miss anything, is there a saner way? ๐Ÿค”</p>" }, "attachment": [ { "type": "Document", "mediaType": "video/mp4", "url": "https://media.bsd.cafe/bsdmmedia01/media_attachments/files/112/681/497/108/671/765/original/aff7f0044db0337c.mp4", "name": null, "blurhash": "UJAT$Z^*gOIA~q?bbHM{%MxufRRjIVRjaeof", "width": 640, "height": 480 } ], "tag": [ { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/png", "name": "#png" }, { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/libpng", "name": "#libpng" }, { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/ewmh", "name": "#ewmh" }, { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/x11", "name": "#x11" }, { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/xcb", "name": "#xcb" }, { "type": "Hashtag", "href": "https://mastodon.bsd.cafe/tags/xrender", "name": "#xrender" } ], "replies": { "id": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092/replies", "type": "Collection", "first": { "type": "CollectionPage", "next": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092/replies?min_id=112682565954938699&page=true", "partOf": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092/replies", "items": [ "https://mastodon.bsd.cafe/users/zirias/statuses/112682565954938699" ] } }, "likes": { "id": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092/likes", "type": "Collection", "totalItems": 4 }, "shares": { "id": "https://mastodon.bsd.cafe/users/zirias/statuses/112681500370813092/shares", "type": "Collection", "totalItems": 1 } }