3 ms·
I wonder how `<canvas>` would compare to `<img src="data:image/svg..."/>` instead
by styfle 5y ago
I wonder how `<canvas>` would compare to `<img src="data:image/svg..."/>` instead
- tomxor 5y agoYes! it did cross my mind, I was just more familiar with canvas API so I cracked on with it... but I suppose encoding a simple format like bitmap would be trivial, almost like being able to access the canvas pixel buffer but with a lower overhead. This thread is a good perf test, I might give it a quick go. Also as others mentions the pixelation style thing is now finally fully cross browser supported, which should make it easier to achieve nearest neighbour upscaling for url encoding. [edit] I underestimated how involved image format headers are!