BMP decoding for Node.js, using [Libnsbmp][Libnsbmp] compiled to [WebAssembly][WebAssembly].
npm install @cwasm/nsbmpBMP decoding for Node.js, using [Libnsbmp][Libnsbmp] compiled to [WebAssembly][WebAssembly].
[Libnsbmp]: https://www.netsurf-browser.org/projects/libnsbmp/
[WebAssembly]: https://webassembly.org
``sh`
npm install --save @cwasm/nsbmp
`js
const fs = require('fs')
const nsbmp = require('@cwasm/nsbmp')
const source = fs.readFileSync('image.bmp')
const image = nsbmp.decode(source)
console.log(image)
// { width: 128,
// height: 128,
// data:
// Uint8ClampedArray [ ... ] }
`
- source (Uint8Array, required) - The BMP dataImageData` - Decoded width, height and pixel data
- returns