BMP Loader Module

This is a really simple bitmap loader that loads a Windows Bitmap File into an image that can be used with the Graphics library.

This is currently only tested with 1 bit per pixel bitmap files, however it should work with 8 and 24 bit files.

var img = require("BMPLoader").load(require('fs').readFileSync("foo.bmp"));
g.drawImage(img, 10, 10);

Reference

/* Load a bitmap (supplied as a string), and return an image object that
 can be used by the Graphics library

 see http://en.wikipedia.org/wiki/BMP_file_format
*/
exports.load = function (bmpString) { ... }

Using

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.