LinusU / cwasm-nsgif

GIF decoding for Node.js, using Libnsgif compiled to WebAssembly
40 stars 0 forks source link

GIF

GIF decoding for Node.js, using Libnsgif compiled to WebAssembly.

Installation

npm install --save @cwasm/nsgif

Usage

const fs = require('fs')
const nsgif = require('@cwasm/nsgif')

const source = fs.readFileSync('image.gif')
const image = nsgif.decode(source)

console.log(image)
// { width: 128,
//   height: 128,
//   data:
//    Uint8ClampedArray [ ... ] }

API

decode(source)