...The prime motivation for this is to prepare mathematical equations for inclusion in HTML files, but there is a broad range of uses beyond that.
dvi2bitmap...
* is written in portable C++, and the program acts as a wrapper round the libdvi2bitmap library (both static and shareable), which abstracts DVI and PK files and their contents, Bitmaps, and various other objects supporting these; the library has extensive API documentation, and is intended to be useful for other projects;
* can generate XBM, XPM and GIF bitmaps, plus PNG, if you have the libpng library installed;
* uses the same kpathsea font-searching library as other TeX programs;
* can read DVI files from a pipe;
* automatically expands internal bitmaps;
* is fast.