HIWI iconHIWI 1.0

HTML Images Without Images
HIWI (HTML Images Without Images) is a set of JavaScript functions for embedding images into HTML files without using separate image files and IMG tags. It produces an HTML table of differently colored cells which will be rendered by a Web browser into the desired image. HIWI includes a basic TGA file parser to generate images on-the-fly.

How does it work?

Very well, thank you!
(Hint: it uses a table of differently coloured background cells!)


< SCRIPT language="JavaScript" SRC="hiwi_image_tga.js" >< /SCRIPT >
< SCRIPT language="JavaScript" SRC="hiwi_image_parser.js" >< /SCRIPT >

< SCRIPT language="JavaScript" SRC="mona_lisa.js" >< /SCRIPT >

document.write(decodeImage(imgTGA, 1));

imgTGA is an array containing a byte-for-byte version of a file. '1' is the scale factory. '1' for normal, '2' for double, etc.

This version is a rough example using many hacks and shortcuts. In short:

Hacks in this version:

* No loading from disc (I couldn't get the Tiddlywiki loadFile code to return non-null content)
* Data ripped from limited subset of TGA formats (it's a basic format, 18 byte header, and BGR data)
* Minor corruption at bottom of image.

last updated on:
October 5th, 2008, 4:33 GMT
developed by:
Steven Goodwin
license type:
GPL (GNU General Public License) 
ROOT \ Internet \ HTTP (WWW)


In a hurry? Add it to your Download Basket!

user rating



1 Screenshot
HIWI - HIWI example

Add your review!