render-gif
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

render-gif Travis CI Build Status

Render a gif and provide frames to draw.

NPM Badge

Install

npm install render-gif

Usage

const fs = require("fs");
const logUpdate = require("log-update");
const renderGif = require("render-gif");
 
renderGif(fs.readFileSync("unicorn.gif"), logUpdate);

API

renderGif(data, callback, options?)

data

Type: array-like

The gif data. Can be anything array-like such as a Buffer, Array or Uint8Array.

callback

Type: (data: ArrayLike) => void

The callback to provide each rendered frame to.

options

Type: object

maximumFrameRate

Type: number
Default: Infinity

The maximum framerate to render the gif at.

Return value

isPlaying

Type: boolean
Default: true

Whether the animation should be rendered and provided to the callback.

Package Sidebar

Install

npm i render-gif

Weekly Downloads

17,378

Version

2.0.4

License

MIT

Unpacked Size

5.99 kB

Total Files

6

Last publish

Collaborators

  • richienb