Pure JS cross platform image encoder/decoder.
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
- JPEG
- BMP
- PNG