Skip to content

revisitors/writegif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

writegif

NPM

Take an image in the format output by http://npm.im/readimage and write it to a gif.

var readimage = require("readimage")
var writegif = require("writegif")
var fs = require("fs")

readimage(fs.readFileSync("./examples/ravenwall.png"), function (err, image) {
  writegif(image, function (err, buffer) {
    fs.writeFileSync("./ravenwall.gif", buffer)
  })
})

More examples are in the examples/ folder!

API

require("writegif")(imageBuffer, callback)

Write a buffer that represents a gif image generated from the imageBuffer.

require("writegif")(imageBuffer, options, callback)

The same as above, but options can contain:

{
  // 1: Best colors, worst performance
  // 200: default, worst colors, best performance
  quality: 10
}

LICENSE

MIT

About

Writes a gif from the image format provided by http://npm.im/readimage

Resources

License

Stars

Watchers

Forks

Packages

No packages published