I added support for displaying blurhashes as image placeholders in #Smithereen on the web. In what is probably the most cursed way possible. It turns out every browser supports the BMP file format, which is just a simple header followed by the raw pixel data. So, here's what I did:
Post
@grishka after using this for a couple of days I can say that it works great.
@grishka BMP also has some row alignment requirements iirc. Don't know if it's relevant for blurhash images though.
@grishka
when i moved vk bot to new server, i rewrited quote image generation to work without extra dependencies:
https://github.com/mittorn/yanina.bot/blob/new_commands/modules/quote.py#L2873
so it just writes bmp header to file stream