{"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":{"integrity":"sha512-NiOaGe+GN0KJqi2STf24hfMkFitDUaIoUU3eKvP/wAbLe8o6FuW5n/x7MHPR0HKvBokp6MQY/j7w8lewEeVCIA==","shasum":"cec3e0197ec3b6c60f02220f50e8757030ff2427","tarball":"http://registry-npm.ywwl.com/decode-bmp/download/decode-bmp-0.2.1.tgz","fileCount":4,"unpackedSize":6519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0G09CRA9TVsSAnZWagAAzfQP/2xloM3i80X9syuEAOnm\nwz8IiMGSoB8akij/3V08KIiLDk2SlcABj4sSGirWrSJ3qoAgk3AHIUkSzbr7\nNzykM31SV4zLi3OIRiVKzn20AAfI3NGYnfECpK6wK4/1l55Ph/OZqNjTH3Bn\n0qgdD5gGdZorFlC9buSZICfr+oUGxEilPUnJxLw+W6T8ooTpSfQ8ID7Y8Bhv\nw2wIO8GUv0qiCYm7savOOStiqWKo6PnwbZbm1kD75hv32qKwfOVqoe8+wa6x\nO2+gYrg8aJz48d+ojCCmSdrCKtMIBkAUGfaIgaURuF8ez4xaWH3vN+2Bg8Ro\nP92dPcydsF/ziYn14qRFj5FT1+z430VE8OgKdbBzfJuZnMS7qOMvxU6DIca7\nw5CKpNQWXmHspA5F1pRq1unkyemJcyRxByyL9W9izGX1jzvyMNOdDccVAaiE\ntbxkwB5/AUyqtptD1ZgBcwMGf+7+JjNUOWGgCAEOyxRasulFfOJ9u4ElDwSw\nWmTn/OVp331AToHa0nXYXl177vi0TmrNimbEldmc+vc7oQQvUHcfwsQ62HIt\n0j9PCJA/vN6RYhW1FoeH3ZZMq/LI8gXPMjX717Q2ZL1W/Ew28gpXwcTHdQNz\nE/exIoOgpyMAGSOBTWId2tzQMCMeHq/9tJl5hTRnxkgR+786XtprQQAzR79r\nbNQq\r\n=PTwc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN2o1T8ZCQXHHTTrJYOflypHw0bUZbxPCanYB9DFu04wIgFvCsJDKsg5OxMGDBzbJ4jx2wZKqbOFJxq2NyGX8Q9xc="}],"size":2174,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.2.1.tgz"},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_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,"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","publish_time":1573940541405,"_cnpm_publish_time":1573940541405,"dist-tags":{"latest":"0.2.1"}}