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!

Related posts:
  1. IE6 PNG fix – Transparent PNG image support for IE6
  2. CSS background image stretch
  3. Validate your form using MooTools
  4. Photoshop Shapes: How to Snap to Pixel
  5. Add Gravatar support to your blog comments

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!

Share this post!

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

  • Share
  • Stumbleupon Cre8ive Commando
    • Share/Bookmark

  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 [...]


Have your say!