@mgwalker/make-bmp

2.0.1 • Public • Published

make-bmp

Make an arbitrary file into a (technically) valid bitmap. I won't offer any suggestions about why you might want to do that, but hey, you can do it if you want to!

Installing

npm install -g @mgwalker/make-bmp

Or install locally if you want to use it as a library for reasons.

Usage

make-bmp encode path-to-my-file.pdf
make-bmp decode path-to-encoded-bitmap.bmp

The library exports to methods:

var makeBmp = require("make-bmp");

makeBmp.toBitmap("path-to-file").then(filename => doStuff());
makeBmp.fromBitmap("path-to-bitmap").then(filename => doOtherStuff());

Both methods return a promise that resolve the output filename. The toBitmap method creates an MD5 hash of the input file for the output filename. The fromBitmap method reads the original filename from the metadata stuffed into the bitmap when it was created.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.1
    1
  • 2.0.0
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @mgwalker/make-bmp

Weekly Downloads

1

Version

2.0.1

License

ISC

Last publish

Collaborators

  • mgwalker