4 ms·
This is a great point! I wonder if it could be made much smaller by instead "vectorizing" the blur. Right now it appears to draw individual pixels, but perhaps
by lvh 7y ago
This is a great point! I wonder if it could be made much smaller by instead "vectorizing" the blur. Right now it appears to draw individual pixels, but perhaps it could draw a few large blurred gradiented circles instead?
(I also appreciate that this is probably me getting overexcited about this, since odds are the JS is cached, and in the case of mobile apps it doesn't matter much.)
- sudhirj 7y agoThere's a pretty awesome project that does this with SVGs. https://pkg.go.dev/mod/github.com/fogleman/primitive https://pkg.go.dev/mod/github.com/fogleman/primitive https://primitive.lol/ 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
- DagAgren 7y agoThat looks great! You could probably devise a much smaller data representation too, to get the size down.
- sudhirj 7y agoYeah, 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.
- darkmighty 7y agoThe 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 http://i.imgur.com/Cb4ecUC.gifv