{"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":{"integrity":"sha512-KKQqCsDsV1MGrCTuosV8PZICqnCWfZT6e+qgeJ2772JnqftNRzWmdRoCrzz2u2qg+XYhi9D1GFuKnOQSm8XcEA==","shasum":"007b5c4ec84817d2916b4266fdcf3282273174a7","tarball":"http://registry-npm.ywwl.com/decode-bmp/download/decode-bmp-0.2.0.tgz","fileCount":4,"unpackedSize":6487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFJ9CRA9TVsSAnZWagAAT+UP/ip0fftc/kWDSCz+ZE9I\nqddZ4yPTlBTBeAhmhnA170hgKE2DLA4bYIHZ3lV/f5/xqFdyifnLoQrdPyK5\njX8BCEC9pV/0A/xUC/PeF2sRahWgAM5DYrJ4IG1pU1Kr+hfNbJTD9BHq/Y9d\nmZJ5HWda1xEx8o/tQNn70VlEEl0175n16IJlF7vBDOgBoIAOZwkBzQRytw2Y\n9lFvsVxJRvvNkCLk0b+5gseEvR+RTdxCjeqKkaCNg0h58s1yM+MAyV1wUR55\n2PL7ML+Vn0TvMTNf5XwQFhRzTWZbQEJQntiGJvBgAHlkVnd5Meo4qBvHLwYS\nszlVFyLyawagyBlT+mJvVDQJU8DSyw3QIdPjujArhhflc02VTKZNsxuTUR29\ngtnVMddxFv79vu8Fnlob5vvjdRHqlGTZ3U3V4/6pWErwrwjx57uk8Y4/YpFF\nBMrhFpI2QIaSPr1GwVROAkxW3QJGhuefXoFlS+6MDYkiCSSm/aEbUqSUXnbm\nWnm4G50msNYeSYmMiV1maQtyBK9WKs4+XIIag2APF9QZqyrcngb/UOXEOx7q\nQI+Cg9L/WbY2W7LvqmahiVSSWvkRDYHESS6TfR2gBeBAl0S5/inLCulNEOpF\nlD3m+kHpRWtpYnrdurwz/mQdj1vxrsMSq3ifciDvGN6QkXqOaQcHUuDNIHQZ\nq7jK\r\n=qEfr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE2byzz84XYPTmzax3QUqx+drRTO3mUcR6Va0wKv4JlOAiAwzKmcg8WSomxsiWYnqhBtngok7q3taVeBF5TAsN8sIw=="}],"size":2165,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.2.0.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.0_1573409404526_0.23112715581435261"},"_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":1573409404704,"_cnpm_publish_time":1573409404704,"dist-tags":{"latest":"0.2.1"}}