News for hackers. Stuff that matters.
Re:BlurHash: Algorithm to generate compact representation of... by sudhirj on Thursday February 20, 2020 @10:12AM (#22375574)
There's a pretty awesome project that does this with SVGs.

https://pkg.go.dev/mod/github.com/fogleman/primitive https://primitive.lol/

I've used it in a project to generate vector thumbnails that are under 1KB that I can just base64 encode and send along with the general text of a page - so the page renders with the text and low-fi images, and then I can load the hi-fi ones as necessary.

The lo-fi images are art in themselves, sometimes I preferred them to the actual images :-P

Re:BlurHash: Algorithm to generate compact representation of... by darkmighty on Thursday February 20, 2020 @02:02PM (#22377613)
The image animation (with randomized recreations) gives an amazing effect. I've never seen this technique before.

Like cinemagraphs, but unique and alive in a nice way.

http://i.imgur.com/Cb4ecUC.gifv

Re:BlurHash: Algorithm to generate compact representation of... by DagAgren on Thursday February 20, 2020 @10:26AM (#22375683)
That looks great!

You could probably devise a much smaller data representation too, to get the size down.

Re:BlurHash: Algorithm to generate compact representation of... by sudhirj on Thursday February 20, 2020 @09:55PM (#22380593)
Yeah, most of the size is the SVG XML cruft. The encoder uses only one kind of svg element with a standard set of attributes, so yeah, absolutely.