JnZ
/ jpg2html
This is the very plain home page for the various versions
of jpg2html written by me. jpg2html converts JPEG images into
HTML. A series of jpg2html are being written to explore
different encoding algorithms.
You can:
- view the original jpeg compressed
test image (6,574 bytes). The image is 152x239
pixels in 24-bit color and so contains 108,984 bytes of
image data. By this definition, jpeg shrinks the data to
just 6.0% of the original size.
- view the output from jpg2html
(486,003 bytes). jpg2html renders the image as HTML
using <pre /> and <font /> elements.
Consecutive pixels of the same color generate only one
<font /> element. jpg2html enlarges the data to
445.9% of the original size.
- view the output from
jpg2html2 (539,161 bytes). jpg2html2 renders the
image as HTML using <table />, <tr /> and
<td /> elements. Consecutive pixels of the same
color generate only one <td /> element specifying
the length via the colspan attribute. jpg2html enlarges
the data to 494.7% of the original size.
- view the output from
jpg2html3 (121,543 bytes). jpg2html3 encodes the
image on a row by row basis into JavaScript strings of
the form "N#RRGGBB" where the optional N is the number
of times the following RRGGBB color value appears. If N
is not present it is assumed to be 1. These JavaScripts
strings are subsequently decoded and rendered as per
jpg2html2. jpg2html3 enlarges the data to 111.5% of the
original size including the decoding and rendering code.
- view the output from
jpg2html4 (91,052 bytes) jpg2html4 encodes the image
on a row by row basis into JavaScript strings of the
form "N=WXYZ" where the optional N is the number of
times the following WXYZ color value appears. If N is
not present it is assumed to be 1. WXYZ is the RRGGBB
color value encoded in base64. These JavaScripts strings
are subsequently decoded and rendered as per jpg2html2.
jpg2html4 shrinks the data to 83.5% of the original
size, including the decoding and rendering code.
- view the output from
jpg2html5 (75,627 bytes) jpg2html5 encodes the image
on a row by row basis into JavaScript strings of the
form "ABCWXYZ" where the optional ABC is the number of
times the following WXYZ color value appears. If ABC is
not present it is assumed to be 1. ABC is a variable
length string which is encoded in base16 using a shifted
character set to avoid clashing with the regular base64
encoding. WXYZ is the RRGGBB color value encoded in
base64. These JavaScripts strings are subsequently
decoded and rendered as per jpg2html2. jpg2html5 shrinks
the data to 69.4% of the original size, including the
decoding and rendering code.
- download all of above in a tar.bz2
file (158,750 bytes)
- visit the SourceForge.net project info page
- download source code and compiled binaries at
SourceForge.net project filelist page
- download local copy of the
compiled 32-bit
Windows binaries of the various jpg2html in a tar.bz2
file (412,422 bytes)
- download local copy of the
source codes of
the various jpg2html in a tar.bz2 file (4,499 bytes)
$Id: index.html,v 1.1 2003/11/22 16:33:07 JnZ Exp $
Copyright (c) 2002, 2003 < JnZ (at) pacific (dot) net (dot) sg >. All rights reserved.