Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 334 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 334 Bytes

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