2.0.5 • Published 7 years ago

filmstrip2gif v2.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

#filmstrip2gif Convert a filmstrip image to an animated GIF in the browser.

NPM

Usage

filmstrip2gif is designed to be used with browserify. To use it, include it in a browserified module:

var filmstrip2gif = require('filmstrip2gif')
var NUM_FRAMES = 10
  , DURATION_SECONDS = 1

filmstrip2gif(document.querySelector('img.film').src, DURATION, NUM_FRAMES, false,
    function(err, gifBlob) {
  if (err) {
    alert('oh no!: ' + err)
    return
  }

  var img = document.createElement('img')
  img.src = window.URL.createObjectURL(gifBlob)
  docuument.body.appendChild(img)
})

API

var filmstrip2gif = require('filmstrip2gif')

filmstrip2gif(imgUrl, duration, numFrames, isHorizontal, cb)

Convert an image located at imgUrl (with known total duration duration and number of frames numFrames, assumed to be evenly distributed) to an animated GIF, calling cb when done. cb is a function(err, gifBlob). If isHorizontal is true, the filmstrip will be sliced into numFrames pieces horizontally, vertically otherwise.

Installation

npm install filmstrip2gif

License

MIT

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago