image-codecs

0.1.1 • Public • Published

image-codecs

Pure JS cross platform image encoder/decoder.

Usage

import { encode, decode } from 'image-codecs';

const imageData = decode(buffer);
// Return: { width, height, data: Uint8Array }

const buffer = encode(imageData, 'jpeg'); // or 'bmp', 'png'
// Return: Buffer

Supported formats

  • JPEG
  • BMP
  • PNG

Package Sidebar

Install

npm i image-codecs

Weekly Downloads

110

Version

0.1.1

License

MIT

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • hans00