bmp2html

Tool to convert a bitmap image to HTML. C++ source code (cross-platform) and Linux binary. Uses Allegro to read bitmaps.

bmp2html is a small, commandline tool to convert a bitmap file to a HTML file. View an example of its output here (A 1970 Lincoln Continental car, 720 kB HTML) or here (a mouse, 691 kB HTML). Because of their size, they may take a while to load! bmp2html uses Allegro to read the bitmaps.

Usage

bmp2html is a commandline tool. This is the output of bmp2html –help:

bmp2html – tool to convert a bitmap image to a HTML file.
Synopsis: bmp2html <bmpfile> [-o <htmlfile>] [-c <character>] [-s <fontsize>] [-p <pixels>] [-b <color>] [-l <height>] [-i]

Parameters:

-c <character> The character to build the image from (default is `x’).
-o <htmlfile> The name of the resulting HTML file (by default the name of the inputfile + .html).
-s <fontsize> The size of the font to be used, in pixels (default is 6px).
-p <pixels> The number of pixels (both horizontal and vertical) one HTML character represents. Use this to reduce the size of the generated HTML (default is 2).
-b <color> Defines the background color for the page. The color must be a color HTML understands (the name of a color or a hex triplet). Default is black.
-l <height> The height of the space between two lines. Can be anything that’s accepted by line-height in CSS (default is 0.5).
-i If specified, bmp2html puts some verbal information about the image in the HTML file.

The generated pages are HTML 4.01-Transitional valid (using <font color=’xxx’> takes less space than <span style=’color:xxx’> ;-).
bmp2html was made by Kipmans – http://jkp.nl.nu

Download

Download C++ source

Leave a comment