{"_id":"@catdad/to-bmp","_rev":"3-7fda11131193d13dc4cd7abd02df8728","name":"@catdad/to-bmp","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@catdad/to-bmp","version":"1.0.0","description":"to-bmp","main":"index.js","bin":{"to-bmp":"bin.js"},"scripts":{"test":"mocha --slow 0 test.js"},"repository":{"type":"git","url":"git+https://github.com/catdad-experiments/to-bmp.git"},"author":{"name":"Kiril Vatev","email":"vatev.1@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/catdad-experiments/to-bmp/issues"},"homepage":"https://github.com/catdad-experiments/to-bmp#readme","engines":{"node":">=10.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"chai":"^4.2.0","end-of-stream":"^1.4.4","eslint":"^5.16.0","is-bmp":"^1.0.1","mocha":"^8.1.3","safe-await":"^1.0.0"},"keywords":["buffer","convert","fast","jpg","png","bmp","encode","encoder","electron","splash","nsis"],"dependencies":{"jpeg-js":"^0.4.2","node-fetch":"^2.6.1"},"gitHead":"aebd838298943581377afc98b79d8f1626e773b4","_id":"@catdad/to-bmp@1.0.0","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-iYGFvWUocP+v1m/85x+22hTI0il7N1be3Vj5+GKiHfu0vy6ery73S0Ol/labyQVllN5GGpvYqORRl/ls0uA1hw==","shasum":"8be1eaf2d3de5cf06e572fb453fd4f5078c1ae0c","tarball":"https://registry.npmjs.org/@catdad/to-bmp/-/to-bmp-1.0.0.tgz","fileCount":7,"unpackedSize":13108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd1dZCRA9TVsSAnZWagAA4J4P/3GRVo7cZpCxFWPiXXyi\n/Z0LVCEEtSma06VS5pwB2Cr3JR9W+tCgRIFWAvwNpGFxRyTQiYs3NhqGRGwM\nMNXI9O4E7z7pFL/FxYMUU/db/Vg7SvOf6uv7+QAyXmqDDq2dgGSFDlGdKH/H\nq7xjhZrJMnBzWX3ltxMQHU03pFsPvUWuJLJ2jFkFl6CfOh6+qkt5JniDQ8VE\nGGsOh942EwNa2YL9D7Mbdfyo1YCtT2LEcQimuyRqjAQ2FImdxm+VBChbyisn\n3yFz0TkKLIj0uVrIBWUz3jupdGb38FzD30TtsnBhRD17k02B5UumY4jbbMxl\nH04L+B6uwv6Tkvia1clX3OjPT4Jx8FzKzvzVJPv3A3b4xXZ2cxMCImWbH0UR\nuK0EYmrB0BEfh3lLPawP9TjYV6wlvy72ikKR6opddVQl0srVMPmhXSCu1/P2\nCcsy2JdBZVDWhgD49ceok6+TsjG60bpBd/k9XHpAr37cDqKsI8Lw2r8vmy8r\nBWwXtyOFjmwbw3026+/NyIHJCrTjrOq2Dz07118Iw7I3f2mvxPOxrViSr2zp\nXgziueo0fLFRjil9440ECVNVV7wwa1p217sW2aCknRvoUtQ9/ig/Q9KRHdXV\nIId4nvc5u78uiHAt8nWcbSsW62lfw+eUu+68g6I10ol9UZG7DUpIP2zDfmSD\nTBtP\r\n=mcRe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEK+/jldQiYUPrm7Ddr01hAQ7sx1JO5wMKhuI0tDgrUgIgfVognQKaYSH5vI3MGQX9axIUE2K1Z9BGXAfT1DuYVhs="}]},"maintainers":[{"name":"catdad","email":"vatev.1@gmail.com"}],"_npmUser":{"name":"catdad","email":"vatev.1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-bmp_1.0.0_1601656665094_0.407925611977183"},"_hasShrinkwrap":false},"1.0.1":{"name":"@catdad/to-bmp","version":"1.0.1","description":"to-bmp","main":"index.js","bin":{"to-bmp":"bin.js"},"scripts":{"test":"mocha --slow 0 test.js"},"repository":{"type":"git","url":"git+https://github.com/catdad-experiments/to-bmp.git"},"author":{"name":"Kiril Vatev","email":"vatev.1@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/catdad-experiments/to-bmp/issues"},"homepage":"https://github.com/catdad-experiments/to-bmp#readme","engines":{"node":">=10.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"chai":"^4.2.0","end-of-stream":"^1.4.4","eslint":"^5.16.0","is-bmp":"^1.0.1","mocha":"^8.1.3","safe-await":"^1.0.0"},"keywords":["buffer","convert","fast","jpg","png","bmp","encode","encoder","electron","splash","nsis"],"dependencies":{"jpeg-js":"^0.4.2","node-fetch":"^2.6.1"},"gitHead":"a6c35d124c477225e2a091fa75313d487fa18a57","_id":"@catdad/to-bmp@1.0.1","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-l5tPy3euJyg5q3wEuaTkXmePt9N7mVUf+rupoDnmfWdlRClhcmjVjVhH52m2MOmWdZsAXFZP3VwVoP37tFgwEw==","shasum":"1cd11e2ce81ba8021e1f2d45996c48512aead163","tarball":"https://registry.npmjs.org/@catdad/to-bmp/-/to-bmp-1.0.1.tgz","fileCount":7,"unpackedSize":13006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd1mWCRA9TVsSAnZWagAAXIIP+wRuefGUE/4rhr21O5JU\nvpOQaQt07Yuuwf8LmDpD5ifPsiUCvd6DrJVnOmaij8L2F4787+yJfTNbZa++\n7SwPpUYwwjOJndWituERPn/alymR9BsdvWP4Z13VB+hp2uA1+a+bgWCE+jYM\n1b5scmwUxFTg107ob/DPQkuW4rsvlo4Lw/2xZdIiJGlSPblGCc3zrjRLf9sj\ncGThm1SLkMXTxV2veT4SRU/q7TtizJ+qFlRzPA75P/FqwQpOVfnzQ0+WtNXB\npAqZl5vuJjFVkydc2WIOoYfqXf9Ht9DNdOR7TxVwqxPF9rjjx+1G1iNHi0S+\nPfYtUn0+Xn7KZqcL8MraMtwoGQpf2uR47Yj2ESKInXUm/fgtS5oe8MWHymgV\nSL1gQexmtsLxkTgc2c1CS2zQOTKhZzggJwbR1ZAvdWYyDKweE76ABddJ03ya\nD0tm/BqjfcJXD+ylTu7iZnyzsDIMrzPGAuPDg7HLkxt05w8nuwfxs2a79c8l\noG8Ilg1v0y8s5As1XhdTnsb7NSng+TrJIjypgq3tdqJQ8neTLPtWCoQvfdu5\nzetgb1pf4WT2pTZ5/0+s56XTTLKRfrFeDjvZmGh7+GrCle2Zh7YRtaPViqDU\nVZucrqya/+WKxS68RpMZgzUTWHJULrtzAJy9saa7aYDUsLd9kLFriSUS59lA\nau1L\r\n=/iTl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0gbIJMG76GhPN+bXzU2at9y7IF1k13qYjxc/ocqllFAiEAuZzo84vFTyZ9edXDl8b4T7wnPVm1nffdOxCSEdMVr6Y="}]},"maintainers":[{"name":"catdad","email":"vatev.1@gmail.com"}],"_npmUser":{"name":"catdad","email":"vatev.1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-bmp_1.0.1_1601657237581_0.42450950428691536"},"_hasShrinkwrap":false},"1.1.0":{"name":"@catdad/to-bmp","version":"1.1.0","description":"to-bmp","main":"index.js","bin":{"to-bmp":"bin.js"},"scripts":{"test":"mocha --slow 0 test.js"},"repository":{"type":"git","url":"git+https://github.com/catdad-experiments/to-bmp.git"},"author":{"name":"Kiril Vatev","email":"vatev.1@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/catdad-experiments/to-bmp/issues"},"homepage":"https://github.com/catdad-experiments/to-bmp#readme","engines":{"node":">=10.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"chai":"^4.2.0","end-of-stream":"^1.4.4","eslint":"^5.16.0","is-bmp":"^1.0.1","mocha":"^8.1.3","safe-await":"^1.0.0"},"keywords":["buffer","convert","fast","jpg","png","bmp","encode","encoder","electron","splash","nsis"],"dependencies":{"jpeg-js":"^0.4.2","node-fetch":"^2.6.1","pngjs":"^5.0.0"},"gitHead":"56780178214922010a3231ca70e6d9698aa76b7f","_id":"@catdad/to-bmp@1.1.0","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-4IF0r2MTRfMGblgV/upLzUmPRaAMXqvnEO2JDFI3HutsN4mEv3TyTD/O/syBjUVP2BVZfVA9+ycZXUXcTqBHIQ==","shasum":"2944529a6665ec5df3395c3131767a5a38a12f0c","tarball":"https://registry.npmjs.org/@catdad/to-bmp/-/to-bmp-1.1.0.tgz","fileCount":7,"unpackedSize":13495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhuj6CRA9TVsSAnZWagAA6AIP/3nKlB+OW7dbPbPcaoRF\ncnEX4nT9PLK5avOMG4PO2+D3b17oD+DiUM+S/EQ9bK5R8/FV+FheEaVywUkW\ncLzIZHXnY8xIJImxJb4BmK1UKARmPxiea2gB52GrYRU2XY7KnwwD7HP/Aver\n7cRtD0EOeCNah9NW7Pwu64totyyWdVl4bFOHkzfQnZxs1lM0mHXOQzXLgrp1\n30Q1cknyq4hTHr91UObPI55ptN0T9ZZjJZV6Ll5t7vavLVjPLo3eutA9FWx0\nLfHqXkt3Eb3qQzx+Kij0Rfu6n2/B9jRg4JQ47/z/Mm0+Ahg1ZHkWv1l5QSN5\nsFPBfBBSISzibaIt5geK/kBcqc0x0PRYZtx2GQO3B6hE71xkDL84cHKQiIRv\n3ivW0LsaqdX5zRQFTaf54tvkPPkyjllHL3r5MRnLf114aMK+gFAo6V6QLwnS\nxJaZm6hPC3Sf369eTTrZblpE4JxCoY4BP6GKEakN26xJnbKg4jOSnDegu9by\nKUChjlNnHsPb/2wuk2Yc8qaY4GXkO9S86pxZWmslW7NCYHdqxGwrbHKTt3KU\nW/u9mMCpkZ0e6W1OLh7sbbJhlhtWtu4Aolnjef26ML3mS4Jd91CZrIN+tReB\nncJg3tMuWoInV2KSbCgfeEgxaLkRbBs7VeQ+9P/sCfA7GGrEkDBEaDgeJB/L\nzOqE\r\n=ircJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtjDLlNLw+jMlc3svxpgYojvpTn2hdPi4eG6gXMHaGWAiEAlMJN6rneBBS5ikJ+E8IBrPJcca3/jPFnX458yVaXKHs="}]},"maintainers":[{"name":"catdad","email":"vatev.1@gmail.com"}],"_npmUser":{"name":"catdad","email":"vatev.1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-bmp_1.1.0_1602676985492_0.7990644184954956"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-02T16:37:45.006Z","1.0.0":"2020-10-02T16:37:45.220Z","modified":"2022-04-04T22:07:42.057Z","1.0.1":"2020-10-02T16:47:17.682Z","1.1.0":"2020-10-14T12:03:05.601Z"},"maintainers":[{"name":"catdad","email":"vatev.1@gmail.com"}],"description":"to-bmp","homepage":"https://github.com/catdad-experiments/to-bmp#readme","keywords":["buffer","convert","fast","jpg","png","bmp","encode","encoder","electron","splash","nsis"],"repository":{"type":"git","url":"git+https://github.com/catdad-experiments/to-bmp.git"},"author":{"name":"Kiril Vatev","email":"vatev.1@gmail.com"},"bugs":{"url":"https://github.com/catdad-experiments/to-bmp/issues"},"license":"MIT","readme":"# @catdad/to-bmp\n\n[![Build Status][travis.svg]][travis.link] [![NPM Downloads][npm-downloads.svg]][npm.link] [![NPM Version][npm-version.svg]][npm.link]\n\n[travis.svg]: https://travis-ci.com/catdad-experiments/to-bmp.svg?branch=master\n[travis.link]: https://travis-ci.com/catdad-experiments/to-bmp\n[npm-downloads.svg]: https://img.shields.io/npm/dm/@catdad/to-bmp.svg\n[npm.link]: https://www.npmjs.com/package/@catdad/to-bmp\n[npm-version.svg]: https://img.shields.io/npm/v/@catdad/to-bmp.svg\n\n> Convert JPG or PNG images to BMP\n\nThis module was specifically created to generate BMP images that are compatible with NSIS in order to create [splash images for Electron portable applications](https://github.com/electron-userland/electron-builder/issues/2548), when I discovered that various popular encoders did not produce images that could be used within NSIS. The encoder in this module is based on [`@wokwi/bmp-ts`](https://github.com/wokwi/bmp-ts).\n\n## Install\n\n```bash\nnpm install @catdad/to-bmp\n```\n\n## API\n\n```javascript\nconst { promises: fs } = require('fs');\nconst toBmp = require('@catdad/to-bmp');\n\n(async () => {\n  const jpeg = await fs.readFile('./path/to/my.jpg');\n  const output = await toBmp(jpeg);\n\n  await fs.writeFile('./path/to/my.bmp', output);\n})();\n```\n\n## CLI\n\nConvert a local image (JPG or PNG) to BMP:\n\n```bash\nnpx @catdad/to-bmp < input.jpg > output.bmp\n```\n\nConvert an image (JPG or PNG) from a url to BMP:\n\n```bash\nnpx @catdad/to-bmp https://example.com/input.png > output.bmp\n```\n\nYou can use these to generate the splash image for your Electorn app directly in a `postinstall` or `prepackage` script.\n\n## Related\n\n* [`@wokwi/bmp-ts`](https://github.com/wokwi/bmp-ts) - the original code that the encoder here is based on\n","readmeFilename":"README.md"}