{"id":17894,"date":"2025-07-31T22:21:17","date_gmt":"2025-08-01T02:21:17","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=17894"},"modified":"2025-07-31T22:21:17","modified_gmt":"2025-08-01T02:21:17","slug":"img2blocks","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2025\/07\/31\/img2blocks\/","title":{"rendered":"img2blocks"},"content":{"rendered":"\n<p>this image is supposed to be made almost entirely of sextant blocks, the Unicode characters around U+1FB00 \u2013 U+1FB1E made out of two columns of three blocks. They&#8217;re originally from <a href=\"https:\/\/en.wikipedia.org\/wiki\/Teletext\">broadcast teletext<\/a>, and were made to build low-resolution images on a text screen<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"396\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/big_cassowary.png\" alt=\"a blocky image of a large flightless bird with the text &quot;Cassowary Detected&quot;\" class=\"wp-image-17897\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/big_cassowary.png 328w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/big_cassowary-265x320.png 265w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/big_cassowary-133x160.png 133w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><figcaption class=\"wp-element-caption\">redrawn from an image in <a href=\"https:\/\/www.abc.net.au\/news\/2025-07-30\/ai-saves-cassowary-lives-reducing-vehicle-strikes-far-north-qld\/105589446\">Artificial intelligence used to reduce cassowary road deaths in Queensland<\/a><\/figcaption><\/figure>\n\n\n\n<p>And here&#8217;s the original tiny image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"59\" height=\"49\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/cassowary-smol.png\" alt=\"a small image of a large flightless bird with the text &quot;Cassowary Detected&quot;\" class=\"wp-image-17898\"\/><figcaption class=\"wp-element-caption\">&#8220;Cassowary Detected&#8221;, at actual size<\/figcaption><\/figure>\n\n\n\n<p>Making the pixel to character map is quite tricky. The Sextant character block isn&#8217;t contiguous, and it&#8217;s not in the order we need. It&#8217;s also missing four characters: empty block, full block, left half block and right half block. These have to be pulled in from other Unicode blocks.<\/p>\n\n\n\n<p>This is the map I came up with, from 0\u201363 with LSB at bottom right and MSB at top left:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;\ud83e\udf1e\ud83e\udf0f\ud83e\udf2d\ud83e\udf07\ud83e\udf26\ud83e\udf16\ud83e\udf35\ud83e\udf03\ud83e\udf22\ud83e\udf13\ud83e\udf31\ud83e\udf0b\ud83e\udf29\ud83e\udf1a\ud83e\udf39\ud83e\udf01\ud83e\udf20\ud83e\udf11\ud83e\udf2f\ud83e\udf09\u2590\ud83e\udf18\ud83e\udf37\ud83e\udf05\ud83e\udf24\ud83e\udf14\ud83e\udf33\ud83e\udf0d\ud83e\udf2b\ud83e\udf1c\ud83e\udf3b\ud83e\udf00\ud83e\udf1f\ud83e\udf10\ud83e\udf2e\ud83e\udf08\ud83e\udf27\ud83e\udf17\ud83e\udf36\ud83e\udf04\ud83e\udf23\u258c\ud83e\udf32\ud83e\udf0c\ud83e\udf2a\ud83e\udf1b\ud83e\udf3a\ud83e\udf02\ud83e\udf21\ud83e\udf12\ud83e\udf30\ud83e\udf0a\ud83e\udf28\ud83e\udf19\ud83e\udf38\ud83e\udf06\ud83e\udf25\ud83e\udf15\ud83e\udf34\ud83e\udf0e\ud83e\udf2c\ud83e\udf1d\u2588<\/pre>\n\n\n\n<p>After that, it&#8217;s a small matter of bashing something together in Python with PIL and Numpy. Here&#8217;s the source:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-3d1e5f46-4ed2-4d58-b502-18564b983533\" href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/img2blocks.zip\">img2blocks.zip<\/a><a href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/img2blocks.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-3d1e5f46-4ed2-4d58-b502-18564b983533\">Download<\/a><\/div>\n\n\n\n<p>or if you want to take a look first: <a href=\"https:\/\/gist.github.com\/scruss\/b064a667cebecf31e4896f92659505e1\">img2blocks &#8211; bitmap to Unicode sextants<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"268\" height=\"388\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/wide_weave-big.png\" alt=\"blocky criss-crossed bars make a pseudo woven pattern\" class=\"wp-image-17900\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/wide_weave-big.png 268w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/wide_weave-big-221x320.png 221w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/07\/wide_weave-big-111x160.png 111w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><figcaption class=\"wp-element-caption\">X11&#8217;s wide_weave, scaled up<\/figcaption><\/figure>\n\n\n\n<p>(yes, there are clever things like <a href=\"https:\/\/github.com\/hpjansson\/chafa\">Chafa<\/a> that can do more, but it can&#8217;t do exactly what this does)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>this image is supposed to be made almost entirely of sextant blocks, the Unicode characters around U+1FB00 \u2013 U+1FB1E made out of two columns of three blocks. They&#8217;re originally from broadcast teletext, and were made to build low-resolution images on a text screen And here&#8217;s the original tiny image: Making the pixel to character map [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,2],"tags":[1814,2540,638],"class_list":["post-17894","post","type-post","status-publish","format-standard","hentry","category-computers-suck","category-goatee-stroking-musing-or-something","tag-bitmap","tag-python","tag-unicode"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4EC","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=17894"}],"version-history":[{"count":5,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17894\/revisions"}],"predecessor-version":[{"id":17903,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17894\/revisions\/17903"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=17894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=17894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=17894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}