J. Mike Rollins (Sparky) [rollins@wfu.edu]
Hyperbola New
My Cats New
Kitty New
Mike is on
Green Cycle Design Group
  My Stuff  
  My Truck  
Jacob's Ladder
My House
My Cars
My Cats New
My Jokes
Pi Poetry
Toro Mower
Speed of a Piston
Not a Pipe
   My House
   My Truck

Not a Pipe

Nov 10, 2009

A couple of days ago, I thought it would be fun to revisit this old idea. I don't intend this to have any practical application, but it is fun in a geeky sort of way. I felt compelled to present this example in the spirit of Rene Magritte "The Treachery of Images".

What you see here is not a pipe, nor is it an image of a pipe. It is an HTML table. The background color of each cell produces the effect of a pixel. For example, here is the code for one pixel <td bgcolor="#fffbff"></td>. The size of each table data cell is defined in a style section in the head of the html page. A real pipe like this is for sale at www.kalyna.ca

Here is a link to the original Perl script. This script requires a parameter for the image and supports an optional parameter for the pixel size. For example, ./image_to_table.pl pipe.png > pipe.html. You will need to install the Perl ImageMagick module. I decided to do some optimizations. I wrote a new version of the script that looks for opportunities to use the colspan attribute. This significantly reduced the size of the tables. Here are some additional images:

My House
My Truck


I just learned that IE and FireFox both support gzipped html pages! The compression ratio is fairly good. So, here are the stats:

truck.png38,322 bytes
truck.html580,192 bytes  15 times original
truck.html.gz55,482 bytes  1.4 times original