1.0.0 • Published 4 years ago
buffer-image v1.0.0
buffer-image
Convert a buffer to and from png image data.
Install
npm install buffer-image
Usage
const bufferImage = require("buffer-image");
(async () => {
const image = await bufferImage(Buffer.from("Hello World"));
const result = await bufferImage.from(image)
console.log(result.toString())
//=> "Hello World"
})()
API
bufferImage(input)
Convert a buffer to a png buffer.
bufferImage.from(input)
Convert a png buffer to a buffer.
input
Type: string
The buffer to convert.
1.0.0
4 years ago