A Python script written in 2015, that will take a raster graphics image (it must not have an alpha channel, i.e. no transparency allowed) and transform it to HTML and CSS. There is no actual use for this, I just wanted to know wether it can be done. Nay: wether I can do it.

With the following image as input and the magnifying factor set to four, the output will look like this.

purple smily

The magnifying factor is hard coded at the moment, but I intend to work on the script a little more so it can be chosen individually at each run.


The code is available on GitHub.

Licensed under the Apache License 2.0.



Fixed a bug in the CSS, so Chrome will display the output correctly.


Code available in this old paste. Basic functionality.

gauntlet, 2016-07-22 23:53 UTC, last edited 2018-08-09 23:22 UTC