jnordberg / gif.js

JavaScript GIF encoding library
http://jnordberg.github.io/gif.js/
MIT License
4.76k stars 668 forks source link

Option to override palette for all frames #27

Closed panrafal closed 10 years ago

panrafal commented 10 years ago

I've added an option to override palette for all frames. By passing the option globalPalette you can provide an [r,g,b,...] array, or true to use the palette of the first frame.

If it's set to true, only one worker is started at first. After the first frame, it's palette is stored, and the remaining workers are spawned.

This PR is based on my previous one https://github.com/jnordberg/gif.js/pull/26 with dithering.

You can see it in action here: http://depthy.me/

jnordberg commented 10 years ago

Thanks again, i'll update the examples with the new options. Awesome website btw!