Img2css: convert any image into a CSS “image” using only box shadows
javier.xyz
javier.xyz
http://www.nedned.net/?x=divify
(Scroll to the bottom to skip the waffle and get to the demo)
Right now I am seeing how that works out for a sizeable image, I don't think I have seen such a deliberately CPU intensive thing run before in a browser. I have no idea if it is doing it or not, so a 'progress bar' could be helpful here.
Starting image size: 604521 bytes
Output CSS: 7077663 bytes
Gzipped: 1572759 bytes
Ratio of original to gzipped output: 2.60x
---
So really, not that bad. Not great, obviously, but not bad.
It's still a fun hack though - reminds me of a similar technique I've seen before using many rectangular divs of a certain size, colour, and position.
Because it's written in js, you could download the jpg like a normal file and do it all client side, so there wouldn't be any penalty from the conversion. But still don't do it. A business probably has bigger problems if it needs to use copy protection.
Actually this could become a liability if spammers catch on.