Skip to content
forked from shaozilee/bmp-js

A pure javascript BMP encoder and decoder for node.js

License

Notifications You must be signed in to change notification settings

rkorszun/bmp-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bmp-js

A pure javascript Bmp encoder and decoder for node.js

Supports 1bit 4bit 8bit 24bit decoding and encoding with 24bit.

##Install

$ npm install bmp-js

How to use?

###Decode BMP

var bmp = require("bmp-js");
var bmpBuffer = fs.readFileSync('aa.bmp');
var bmpData = bmp.decode(bmpBuffer);
//bmpData={data:Buffer,width:Number,height:Height}

###Encode RGB

var bmp = require("bmp-js");
//bmpData={data:Buffer,rgb:Boolean=false,width:Number,height:Height} default RGBA (4 bytes per pixel in input)
var rawData = bmp.encode(bmpData);//default no compression

License

U can use on free with MIT License

About

A pure javascript BMP encoder and decoder for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%