Convert an Image to CSS Automatically

Have you ever wondered if you could automatically convert an image into HTML and CSS code? It could come in handy when trying to bypass the image filters in email clients. Well, Img to CSS is an interesting little online tool that does just this. It converts an image into HTML/CSS automatically.

It’s actually quite a clever little tool. It basically takes the image file and creates a HTML table of pixels with background colours that match the image file. Row by row it reads the pixels on the image and builds the HTML table, inserting the CSS styles inline.

The basic idea behind Img to CSS is to bypass image filters in email clients to ensure that images don’t get blocked. The HTML/CSS conversion does create quite a lot of code though so I’m not sure how useful it would be when dealing with commercial email templates. It’s definitely clever though and lots of fun to have a play with. Convert your image to CSS today!

Adham Dannaway

Web Designer and Front End Developer with a passion for web design, coding, blogging, WordPress and chewing gum. Check out my web design portfolio and follow me on Twitter and Facebook!

Tags: , , , , , , , , , ,


  1. Bertram Simon on August 11, 2011

    If you are looking for something with a smaller output, check http://xoc.de/image2html.php

Trackbacks

  1. […] Convert an Image to CSS Automatically […]


0

Have your say!