JSPM

buffer-image

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 234
  • Score
    100M100P100Q77369F
  • License MIT

Convert a buffer to and from png image data.

Package Exports

  • buffer-image

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (buffer-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

buffer-image Travis CI Build Status

Convert a buffer to and from png image data.

NPM Badge

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.