gif.js icon indicating copy to clipboard operation
gif.js copied to clipboard

Support transparency and reserved colors in the palette

Open leeoniya opened this issue 12 years ago • 4 comments

It would also be good if rgba(0,0,0,0) pixels are converted to the transparent color

leeoniya avatar May 20 '13 20:05 leeoniya

(re-worded the issue slightly)

jnordberg avatar May 21 '13 14:05 jnordberg

This should be fairly straightforward as the GIFEncoder object exposes a setTransparent(number) method. If I can get hip to the coffeescript I might try to mess with this and open a PR.

Also, it seems that setTransparent() refers to a color in the table, not a specific hex color?

beager avatar Oct 05 '13 18:10 beager

I have submitted #15 that will allow you to explicitly set a background color when instantiating the encoder. This does not address reserved colors.

As for rgba(0,0,0,0), I'm not sure how all of that would work. All of my experience is with converting a canvas context, which in my experience has some full-alpha color at all times.

beager avatar Oct 06 '13 04:10 beager

:+1: for rgba(0,0,0,0) transparency

1j01 avatar Oct 03 '14 02:10 1j01