Nobel Prize Magnet

    @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

    Keywords

    none

    Install

    npm i @cwasm/nsgif

    DownloadsWeekly Downloads

    5,075

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    35.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • linusu