jnordberg / gif.js

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

fix for transparent option #21

Closed zbryikt closed 10 years ago

zbryikt commented 10 years ago

I can't successfully set transparent color so I dug into the code and found that in GIFEncoder.js index was used to query an array,but index was a floating point number calculated by i / 3.

Besides when converting frames to tasks, transparent was omitted so the transparent color didn't pass to GIFEncoder.js.

so I added "parseInt(i / 3)" in GIFEncoder.js and "transparent: frame.transparent" in gif.coffee getTask function and everything works now.

jnordberg commented 10 years ago

Thanks, can you remove the built js from the commit?

zbryikt commented 10 years ago

Done, please help check if this is what you meant.

jnordberg commented 10 years ago

It is, cheers