{"_id":"decode-bmp","_rev":"3212340","name":"decode-bmp","description":"Decode `.bmp` images","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"linusu","email":""}],"time":{"modified":"2024-02-22T02:25:16.000Z","created":"2018-11-06T21:21:00.567Z","0.2.1":"2019-11-16T21:42:21.405Z","0.2.0":"2019-11-10T18:10:04.704Z","0.1.0":"2018-11-06T21:21:00.567Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/LinusU/decode-bmp.git"},"versions":{"0.2.1":{"name":"decode-bmp","version":"0.2.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/decode-bmp.git"},"scripts":{"test":"standard && mocha"},"dependencies":{"@canvas/image-data":"^1.0.0","to-data-view":"^1.1.0"},"devDependencies":{"globby":"^10.0.1","lodepng":"^2.0.0","mocha":"^6.2.2","standard":"^14.3.1"},"engines":{"node":">=8.6.0"},"gitHead":"c0ba51ff9716467e0ad02fead507a26a44729cf0","description":"Decode `.bmp` images","bugs":{"url":"https://github.com/LinusU/decode-bmp/issues"},"homepage":"https://github.com/LinusU/decode-bmp#readme","_id":"decode-bmp@0.2.1","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"shasum":"cec3e0197ec3b6c60f02220f50e8757030ff2427","size":2174,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-bmp/download/decode-bmp-0.2.1.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-bmp_0.2.1_1573940541239_0.5598432914300677"},"_hasShrinkwrap":false,"publish_time":1573940541405,"_cnpm_publish_time":1573940541405,"_cnpmcore_publish_time":"2021-12-16T23:42:48.835Z"},"0.2.0":{"name":"decode-bmp","version":"0.2.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/decode-bmp.git"},"scripts":{"test":"standard && mocha"},"dependencies":{"@canvas/image-data":"^1.0.0","to-data-view":"^1.0.0"},"devDependencies":{"globby":"^10.0.1","lodepng":"^2.0.0","mocha":"^6.2.2","standard":"^14.3.1"},"engines":{"node":">=8.6.0"},"gitHead":"a2f3f32fe6349c8dbcec41c6cfb1ecad8f770183","description":"Decode `.bmp` images","bugs":{"url":"https://github.com/LinusU/decode-bmp/issues"},"homepage":"https://github.com/LinusU/decode-bmp#readme","_id":"decode-bmp@0.2.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"shasum":"007b5c4ec84817d2916b4266fdcf3282273174a7","size":2165,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-bmp/download/decode-bmp-0.2.0.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-bmp_0.2.0_1573409404526_0.23112715581435261"},"_hasShrinkwrap":false,"publish_time":1573409404704,"_cnpm_publish_time":1573409404704,"_cnpmcore_publish_time":"2021-12-16T23:42:49.712Z"},"0.1.0":{"name":"decode-bmp","version":"0.1.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/decode-bmp.git"},"scripts":{"test":"standard && mocha"},"dependencies":{"to-data-view":"^1.0.0"},"devDependencies":{"globby":"^8.0.1","lodepng":"^1.1.0","mocha":"^5.2.0","standard":"^11.0.1"},"engines":{"node":">=6"},"gitHead":"3fd01a88e829d925074daff3a0f9ec84200b8c6b","description":"Decode `.bmp` images","bugs":{"url":"https://github.com/LinusU/decode-bmp/issues"},"homepage":"https://github.com/LinusU/decode-bmp#readme","_id":"decode-bmp@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"a7a0ad133dcdc717a437132e86fd91124254d090","size":2092,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-bmp/download/decode-bmp-0.1.0.tgz"},"maintainers":[{"name":"linusu","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-bmp_0.1.0_1541539257676_0.9550185027524918"},"_hasShrinkwrap":false,"publish_time":1541539260567,"_cnpm_publish_time":1541539260567,"_cnpmcore_publish_time":"2021-12-16T23:42:49.912Z"}},"readme":"# Decode BMP\n\nDecode `.bmp` images\n\n## Installation\n\n```sh\nnpm install --save decode-bmp\n```\n\n## Usage\n\n```js\nconst decodeBmp = require('decode-bmp')\nconst fs = require('fs')\n\nconst source = fs.readFileSync('foobar.bmp')\nconst image = decodeBmp(source)\n\nconsole.log(image)\n//=> { width: 32, height: 32, data: Uint8ClampedArray(...), colorDepth: 32 }\n```\n\n## API\n\n### `decodeBmp(source: ArrayBuffer | Buffer) => ImageData`\n\nDecodes the `.bmp` file in the given buffer, and returns an image.\n\nThe image has the following properties:\n\n- `width: number` - The width of the image, in pixels\n- `height: number` - The height of the image, in pixels\n- `data: Uint8ClampedArray` - The data of the image, in the `RGBA` format\n- `colorDepth: number` - The color depth of the image as the number of bits used per pixel\n","_attachments":{},"homepage":"https://github.com/LinusU/decode-bmp#readme","bugs":{"url":"https://github.com/LinusU/decode-bmp/issues"},"license":"MIT"}