Hacker News new | ask | show | jobs
by IvanK_net 1187 days ago
I think they should siply use four patches of BC1 (DXT1) texture: https://en.wikipedia.org/wiki/S3_Texture_Compression

It allows storing a full 8x8 pixel image in 32 Bytes (4 bits per RGB pixel).

3 comments

> 4 bits per RGB pixel

That sounds inferior. From the article:

> ThumbHash: ThumbHash encodes a higher-resolution luminance channel, a lower-resolution color channel, and an optional alpha channel.

You want more bits in luminance. And you probably also don't want sRGB.

Nice idea. I tried it, it works really well: https://imgur.com/a/p3l6ABh

A software decoder would be tiny and you can use an existing good BC1 encoder.

Wow, nice! I wrote a BC1 encoder in JS, it is quite simple :) https://github.com/photopea/UTEX.js/blob/master/UTEX.js#L198
If it's really that simple, looking forward to your github repo that gives folks the JS and Rust libraries to do that =)