{"_id":"bmp-js","_rev":"359134","name":"bmp-js","description":"A pure javascript BMP encoder and decoder","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"shaozilee","email":"shaozilee@gmail.com"}],"time":{"modified":"2021-07-13T08:44:38.000Z","created":"2014-08-04T07:23:12.671Z","0.1.0":"2018-04-23T05:00:40.902Z","0.0.3":"2016-11-22T05:34:37.598Z","0.0.2":"2016-08-26T03:15:04.595Z","0.0.1":"2014-08-04T07:23:12.671Z"},"users":{"dofy":true,"leizongmin":true},"author":{"name":"shaozilee","email":"shaozilee@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/shaozilee/bmp-js.git"},"versions":{"0.1.0":{"name":"bmp-js","version":"0.1.0","description":"A pure javascript BMP encoder and decoder","main":"index.js","repository":{"type":"git","url":"git+https://github.com/shaozilee/bmp-js.git"},"keywords":["bmp","1bit","4bit","8bit","16bit","24bit","32bit","encoder","decoder","image","javascript","js"],"author":{"name":"shaozilee","email":"shaozilee@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{},"gitHead":"60fa5ad6ac2f0ce0d2d157de187831a82cdb2cd6","bugs":{"url":"https://github.com/shaozilee/bmp-js/issues"},"homepage":"https://github.com/shaozilee/bmp-js#readme","_id":"bmp-js@0.1.0","scripts":{},"_shasum":"e05a63f796a6c1ff25f4771ec7adadc148c07233","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"shaozilee","email":"shaozilee@gmail.com"},"dist":{"shasum":"e05a63f796a6c1ff25f4771ec7adadc148c07233","size":43502,"noattachment":false,"key":"/bmp-js/-/bmp-js-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bmp-js/download/bmp-js-0.1.0.tgz"},"maintainers":[{"name":"shaozilee","email":"shaozilee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bmp-js_0.1.0_1524459640834_0.7767685293103714"},"_hasShrinkwrap":false,"publish_time":1524459640902,"_cnpm_publish_time":1524459640902},"0.0.3":{"name":"bmp-js","version":"0.0.3","description":"A pure javascript BMP encoder and decoder","main":"index.js","repository":{"type":"git","url":"git+https://github.com/shaozilee/bmp-js.git"},"keywords":["bmp","1bit","4bit","8bit","24bit","encoder","decoder","image","javascript","js"],"author":{"name":"shaozilee","email":"shaozilee@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{},"gitHead":"ed420afbf1682ebe34abcbbe23dfbcabaaf161f0","bugs":{"url":"https://github.com/shaozilee/bmp-js/issues"},"homepage":"https://github.com/shaozilee/bmp-js#readme","_id":"bmp-js@0.0.3","scripts":{},"_shasum":"64113e9c7cf1202b376ed607bf30626ebe57b18a","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.1","_npmUser":{"name":"shaozilee","email":"shaozilee@gmail.com"},"dist":{"shasum":"64113e9c7cf1202b376ed607bf30626ebe57b18a","size":3516,"noattachment":false,"key":"/bmp-js/-/bmp-js-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/bmp-js/download/bmp-js-0.0.3.tgz"},"maintainers":[{"name":"shaozilee","email":"shaozilee@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bmp-js-0.0.3.tgz_1479792875581_0.47241814457811415"},"directories":{},"publish_time":1479792877598,"_cnpm_publish_time":1479792877598,"_hasShrinkwrap":false},"0.0.2":{"name":"bmp-js","version":"0.0.2","description":"A pure javascript BMP encoder and decoder","main":"index.js","repository":{"type":"git","url":"git+https://github.com/shaozilee/bmp-js.git"},"keywords":["bmp","1bit","4bit","8bit","24bit","encoder","decoder","image","javascript","js"],"author":{"name":"shaozilee","email":"shaozilee@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{},"gitHead":"a93b7b4d1afeeb2a52c3bb96969e158d6403a142","bugs":{"url":"https://github.com/shaozilee/bmp-js/issues"},"homepage":"https://github.com/shaozilee/bmp-js#readme","_id":"bmp-js@0.0.2","scripts":{},"_shasum":"c268321f8085df177dfcaaa059c19254862fa158","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"shaozilee","email":"shaozilee@gmail.com"},"dist":{"shasum":"c268321f8085df177dfcaaa059c19254862fa158","size":3514,"noattachment":false,"key":"/bmp-js/-/bmp-js-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bmp-js/download/bmp-js-0.0.2.tgz"},"maintainers":[{"name":"shaozilee","email":"shaozilee@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bmp-js-0.0.2.tgz_1472181302837_0.6284751661587507"},"directories":{},"publish_time":1472181304595,"_cnpm_publish_time":1472181304595,"_hasShrinkwrap":false},"0.0.1":{"name":"bmp-js","version":"0.0.1","description":"A pure javascript BMP encoder and decoder","main":"index.js","repository":{"type":"git","url":"https://github.com/shaozilee/bmp-js"},"keywords":["bmp","1bit","4bit","8bit","24bit","encoder","decoder","image","javascript","js"],"author":{"name":"shaozilee","email":"shaozilee@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/shaozilee/bmp-js/issues"},"homepage":"https://github.com/shaozilee/bmp-js","_id":"bmp-js@0.0.1","_shasum":"5ad0147099d13a9f38aa7b99af1d6e78666ed37f","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"shaozilee","email":"shaozilee@gmail.com"},"maintainers":[{"name":"shaozilee","email":"shaozilee@gmail.com"}],"dist":{"shasum":"5ad0147099d13a9f38aa7b99af1d6e78666ed37f","size":3199,"noattachment":false,"key":"/bmp-js/-/bmp-js-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bmp-js/download/bmp-js-0.0.1.tgz"},"directories":{},"publish_time":1407136992671,"_cnpm_publish_time":1407136992671,"_hasShrinkwrap":false}},"readme":"bmp-js\n======\n\nA pure javascript Bmp encoder and decoder for node.js\n\nSupports all bits decoding(1,4,8,16,24,32) and encoding with 24bit.\n\n##Install\n\n\t$ npm install bmp-js\n\n\nHow to use?\n---\n###Decode BMP\n```js\nvar bmp = require(\"bmp-js\");\nvar bmpBuffer = fs.readFileSync('bit24.bmp');\nvar bmpData = bmp.decode(bmpBuffer);\n\n```\n\n`bmpData` has all properties includes:\n\n1. fileSize,reserved,offset\n\n2. headerSize,width,height,planes,bitPP,compress,rawSize,hr,vr,colors,importantColors\n\n3. palette\n\n4. data-------byte array order by ABGR ABGR ABGR,4 bytes per pixel\n\n\n###Encode RGB\n```js\nvar bmp = require(\"bmp-js\");\n//bmpData={data:Buffer,width:Number,height:Height}\nvar rawData = bmp.encode(bmpData);//default no compression,write rawData to .bmp file\n\n```\n\nLicense\n---\nU can use on free with [MIT License](https://github.com/shaozilee/bmp-js/blob/master/LICENSE)","_attachments":{},"homepage":"https://github.com/shaozilee/bmp-js#readme","bugs":{"url":"https://github.com/shaozilee/bmp-js/issues"},"license":"MIT"}