3 ms·
I mean, you could. Not a browser author or map maker but thinking it out loud. This would be a 'rectangle color' specific. Probably 24 bytes to represent hei
by silisili 5y ago
I mean, you could. Not a browser author or map maker but thinking it out loud.
This would be a 'rectangle color' specific. Probably 24 bytes to represent height, width, color? It seems like a Herculean effort to attempt to get browser support for such a thing, for a phenomenally rare use case. It would need to be an image format probably and not a browser implementation, since they're usually arranged around other images. And all for saving some 60 bytes per square.
To be clear I'm not saying it's a bad idea - I'm all for it. It just seems like a pretty edge use case(large blobs of single color images such as oceans in cartoon maps).
- cmeacham98 5y ago> It seems like a Herculean effort to attempt to get browser support for such a thing https://caniuse.com/datauri https://caniuse.com/datauri
- silisili 5y agoData URIs have much more widespread utility than what is being discussed, I think.
- Retr0id 5y agofwiw, JPEG-XL manages to encode the whole image in only 22 bytes.
- eslaught 5y agoPeople can and have written image decoders for custom formats in Javascript [1]. This seems like the same thing but for a very domain-specific use case. Worth it? Not sure. But possible? Definitely. [1]: https://bellard.org/bpg/ https://bellard.org/bpg/