Giter Club home page Giter Club logo

cianimatedgif's Introduction

ciAnimatedGif

A library for playing back Animated Gifs in Cinder 0.9.0

Why

Gifs are a common enough format that I am often asked to include them in projects despite the format being pretty old fashioned and not particularly suited to desktop applications. They are unique in that each frame can have it's own timing between frames. Since there wasn't a simple library I found that could handle this, the block was born.

Setup

Setup is super easy, simply add the files to your project, or use TinderBox when you set up your project initially.

The code itself is very easy, just load and then draw. When you call draw, the update will be called automatically. If you don't want to draw it, feel free to call update manually.

ciAnimatedGifRef    mGif;
mGif = ciAnimatedGif::create( loadAsset("someGif.gif") );
mGif->draw();

If a gif uses a global palette (which is not guaranteed, but common) you can also access it with mGif->getPalette(); which will return a std::vector<ci::Color>.

See the sample project for use, and check out http://giflib.sourceforge.net/whatsinagif/bits_and_bytes.html for more information about what is under the hood of a gif.

Find the official spec here.

Icon from icons8.

cianimatedgif's People

Contributors

cwhitney avatar brucelane avatar eighteight avatar

Watchers

 avatar James Cloos avatar

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.