Last active
August 29, 2015 14:13
-
-
Save 8bitDesigner/6db8efd7a84282b20e3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GIFEncoder = require('gifencoder') | |
, fs = require('fs') | |
, path = require('path') | |
, encoder = new GIFEncoder(864, 486) | |
, pngFileStream = require('png-file-stream') | |
, dir = process.argv[2] | |
pngFileStream(path.join(dir, '*.png')) | |
.pipe(encoder.createWriteStream({ repeat: 0, delay: 100, quality: 10 })) | |
.pipe(fs.createWriteStream('myanimated.gif')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"gifencoder": "^1.0.6", | |
"png-file-stream": "^1.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
node index.js path/to/folder/of/pngs/