{"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":{"integrity":"sha512-i7ImaOawHIwQNIt3IpO8X04ZRGI4A7gqX3vPw5aMIqMwsAk5xs/pnWLKmXc97nII5rSGJB9QyauO5FwctFiYoQ==","shasum":"a7a0ad133dcdc717a437132e86fd91124254d090","tarball":"http://registry-npm.ywwl.com/decode-bmp/download/decode-bmp-0.1.0.tgz","fileCount":4,"unpackedSize":6255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4gW9CRA9TVsSAnZWagAA0doQAJi4O7EO/ceedtVbqWS0\n7WZ7pH5odVQPJtbz8Gzoi/DcGZKQ4ERVdWrm+2q/8qHVSRvNeHmlP3xsL5rQ\nlhve8nPQpcdYmh3X5qXBCSTUOmXAWP5/nMfUeHaPsETbTISioP9H8TefKv70\nR1zVGbBiV8HAmduYIZuHcLphM4v/rYLXTSysTTsrpy7UY/DXm+Cd51EeGwuO\niaS0Ov0NEZO+5FKnNJIBsYBzMJGxt7yCqeFug7MbmiaK32FGNh7zrR+kLGxh\nfQNtaJ7N9T4itW7fTiQu+5643CdHi0Yuv6Iwlror0B4ofNnEsjJxcq8UzMB3\nIOkHwYZbzwfLkLqWvqLc2BUUlHwOlCdfi8KPbTqw4ZYnXfIUP1gloT7WpxuR\nAZ9h7naQdvEOII8qFC/VRSQVBOJxd2zPSmpRWHimajgyn+1Y+sbgB4uRcnyg\n3Mokifv0UM/GknHgZoSPARchF+M4kIASxKNb/vd9Tu2uk+QU7hkV9KzC8mtv\nWo5tEk5qr8QGn7dh2mGybrDTH7LTh9u1hjqzURoNEIqOomFzDlo6cafZhjVm\ncGFj380MmId2pQcfro4gR4GDytRYJqhIqi3kR5o++qEHwjuSkIYcoEXfydpA\nZk0hX+Pu2LBFXEQmpTiXLftYA79lxGO8RG6EWuwDRVqAR7ny6nJPxUtlVqt3\nRaUV\r\n=eETX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRyEhesXKsMxZ9DlvNmzvtnbbOx0wHC8hqFRMHhCg6zAiAuHrKEhhtPS40T3ZOmeET+3VXZyNOnxD3FiyKOHtOi8g=="}],"size":2092,"noattachment":false,"key":"/decode-bmp/-/decode-bmp-0.1.0.tgz"},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-bmp_0.1.0_1541539257676_0.9550185027524918"},"_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":1541539260567,"_cnpm_publish_time":1541539260567,"dist-tags":{"latest":"0.2.1"}}