@cwasm/nsgif
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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)

  • source (Uint8Array, required) - The GIF data
  • returns ImageData - Decoded width, height and pixel data

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    5,502
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    5,502
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @cwasm/nsgif

Weekly Downloads

5,502

Version

0.1.2

License

MIT

Unpacked Size

35.2 kB

Total Files

5

Last publish

Collaborators

  • linusu