1.0.1 • Published 5 years ago

screencast-gif v1.0.1

Weekly downloads
8
License
-
Repository
-
Last release
5 years ago

Screencast GIF

Generation GIF from Screencast PNG

Install

npm install screencast-gif

Usage

const fs = require("fs");
const ScreencastGIF = require("screencast-gif");
let buf = ScreencastGIF({
    //transform png transparent pixels
    pngBgColor: 0xffffff,

    //global

    //the number of times to loop, or 0 for forever.
    loop: 0,

    //Handling of Global Color Table
    palette: [0xffffff, 0x000000],
    //background color index
    background: 0,

    //frame
    frame: {
        //ms
        delay: 100,

        //0 - No disposal specified.
        //1 - Do not dispose. 
        //2 - Restore to background color.
        //3 - Restore to previous. 
        disposal: 0,

        //transparent color index
        transparent: 0
    },
   
    frames: ["1.png", "2.png", "3.png", {
        path: "4.png",
        delay: 500
    }]
});
fs.writeFileSync("my.gif", buf);

CHANGELOG

  • v1.0.1
    • fix delay in ms (1000 = 1s) from hundredths of a sec (100 = 1s).