Git Product home page Git Product logo

gifstream's Introduction

gifStream is a JavaScript tool for creating large animated graphics on the web.

Install

npm i -S @entryline/gifstream

Example Usage

  import GifStream from '@entryline/gifstream';

  const gifStream = new GifStream();

  gifStream.createGIF({
    'gifWidth': 100, // (Number in pixels) required
    'gifHeight': 100, // (Number in pixels) required
    'images': [
      {src:'someURL', text:'some frame text'}, Frame-specific text
      {src:'someURL', delay: 2000}, // An src is required
      {src:'someURL', delay: 1000} // delay ms
    ],
    'waterMarkXCoordinate': 10 // (Number in pixels) required if using watermark
    'waterMarkYCoordinate': 100, // (Number in pixels) required if using watermark
    'waterMarkHeight': 100, // (Number in pixels) required if using watermark
    'waterMark': image, // A javascript image
    'waterMarkWidth': 100, // (Number in pixels) required if using watermark
    'fontSize': someSize + 'px', // currently required
    'textXCoordinate': 0,
    'textYCoordinate': 0,
    'fontColor': '#fff',
    'fontWeight': '300',
    'fontFamily': 'Open Sans',
    'showFrameText': true, // Hide or show frame text
    'extraLastFrameDelay': 1000, // ...
    'text': '', // Text to show throughout
    'stroke': {
      'color': '#000',
      'pixels': 1
    },
    'pause': 1
    }, onGifComplete);
  };

Cancel requests

Tested in chrome, Edge, and Firefox (and does not break anything in IE)

createGif() {
  gifStream.createGIF({this.options})
  this.isDownloading = true;
}
componentWillUnmount() {
  if (this.isDownloading) {
    gifStream.cancel();
  }
}

Credits

gifstream would like to thank the following individuals and origanization for whom this project would not have been possible without:

@benJaki2, @ZachTRice, @nasa-gibs, Worldview, @jimmywarting, @gfranko, @ChaseWest

gifstream's People

Contributors

benjaki2 avatar dependabot-preview[bot] avatar zachtrice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

avall schulzj01

gifstream's Issues

create defaults

Right now there are only a few items with defaults. There should be a file dedicated to default options. This will prevent the gifCreation from breaking when some needed options aren't included.

Add Browserify & or Babel

Description

Add compilers for modernJS and module loaders

@ZachTRice Do we want to do this or should we just keep it in es6 and let people convert it on their own?

Add linter

Add linting to prevent poorly styled code from being committed

Accept video file types

Issue
As of now, gifStream only accepts an array of images

Proposed solution
accept .mov, mp4 files and convert them into GIFs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.