Hacker News new | ask | show | jobs
by lifthrasiir 2599 days ago
There is a Ruby port [1] publicly available. From the encoding routine [2], it seems to be an sRGB correction followed by a two-dimensional DCT. The first two bytes encode parameters---the size of the output matrix n x m and the quantization scale used for ACs; next 4 bytes encode the DC, then (nm-1) quantized ACs (2 bytes per AC) follow. The comparison to Facebook's similar solution [3] would be interesting (but I realize that Blurhash tries to hide explicit images, so technically they have different goals).

[1] https://github.com/Gargron/blurhash/

[2] https://github.com/Gargron/blurhash/blob/master/ext/blurhash...

[3] https://code.fb.com/android/the-technology-behind-preview-ph...

1 comments

I created the algorithm, and there is a proper release of it with documentation and implementations in a few languages coming... "soon". It's a work project, so trying to find time to work on it is always tricky.

If you have any questions, feel free to ask.

The main goal of it is to be a placeholder while images load, but it also has a nice secondary use for hiding sensitive images here. Other aims of the algorithm is to be very simple and easy to implement, and to use very small amounts of data to make it comfortable to include in databases and responses (Facebook uses 200 bytes of data, BlurHash uses around 30, depending on settings.)

Off topic but I did a double take when I scrolled past your name. Are you the same guy who did some kind of imageboard related stuff years ago? I know that's vague, but my brain is fried and I can't remember why I remember you.
Many, many years ago, yes. Well remembered.
I'd just like to say thanks for creating Wakaba and Kareha and furthering internet culture (and its study). I can't begin to recount the times I had hosting a small board with a few friends and of course the good experience on all the Wakaba boards I used, and my blog which for a while was running on an admin-OP-only basis. Wakaba was arguably what got me into Perl.
trev and acostoss (from our same community) are also lead devs on mastodon.
They both aren't really anymore, but they do hang out.